I've got a piece of script that works that looks like this:
_______________ _______________ _______________ ______________
$username="daed alus_admin";
$password="test ";
$database="daed alus_db";
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM user WHERE username='daeda lus";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
_______________ _______________ _______________ ______________
I want to change it to this so that I can use a variable from a session at a later date:
_______________ _______________ _______________ ______________
$schque="daedal us"
$username="daed alus_admin";
$password="test ";
$database="daed alus_db";
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM user WHERE username='$schq ue";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
_______________ _______________ _______________ ______________
But as soon as I change the criteria of the WHERE to $schque the page stops working and comes up blank, i've tried it without the ' round it but it still doesn't work, I'm really confused any help would be appriecated.
_______________ _______________ _______________ ______________
$username="daed alus_admin";
$password="test ";
$database="daed alus_db";
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM user WHERE username='daeda lus";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
_______________ _______________ _______________ ______________
I want to change it to this so that I can use a variable from a session at a later date:
_______________ _______________ _______________ ______________
$schque="daedal us"
$username="daed alus_admin";
$password="test ";
$database="daed alus_db";
mysql_connect(l ocalhost,$usern ame,$password);
@mysql_select_d b($database) or die( "Unable to select database");
$query="SELECT * FROM user WHERE username='$schq ue";
$result=mysql_q uery($query);
$num=mysql_numr ows($result);
_______________ _______________ _______________ ______________
But as soon as I change the criteria of the WHERE to $schque the page stops working and comes up blank, i've tried it without the ' round it but it still doesn't work, I'm really confused any help would be appriecated.
Comment