I've been strugling with this problem for some time now, and i don't really know what to look for/try to correct.
I've made this login, and the login works fine and everything. The case is, that i want to find and pass the ID session. Where the id number is found in the same row as the Username session, passed from the login.
The problem is, around 75% of the time i login, i get the error:
"No database selected" sounds like a SQL problem, but on the other hand since i can login the last 25% i also suspect that it might be the session?
The session "MM_Username" is sent from a prior page:
Anyone, knows what it is that causes the problem?
And btw. i tested this on my own test server, and on frihost's one. So i don't think it's MySQL.
I've made this login, and the login works fine and everything. The case is, that i want to find and pass the ID session. Where the id number is found in the same row as the Username session, passed from the login.
The problem is, around 75% of the time i login, i get the error:
| Quote: |
| No database selected |
"No database selected" sounds like a SQL problem, but on the other hand since i can login the last 25% i also suspect that it might be the session?
| Quote: |
|
<?php require_once("Connections/DaTaBaSeR.php"); $Violet = $_SESSION["User_Username"]; $Fuchsia = mysql_query(" SELECT users.ID FROM users WHERE users.Username = '$Violet'") or die(mysql_error()); while($row = mysql_fetch_array($Fuchsia)) { $_SESSION["ID"] = $row["ID"]; } ?> |
The session "MM_Username" is sent from a prior page:
| Quote: |
| $_SESSION['User_Username'] = "Vanilla"; |
Anyone, knows what it is that causes the problem?
And btw. i tested this on my own test server, and on frihost's one. So i don't think it's MySQL.
