[PHP]function flash_search()
{
$query="SELECT score FROM hi WHERE name='$sname'";
$scre=mysql_que ry($query);
$res=mysql_fetc h_array($scre,M YSQL_ASSOC);
echo $sname;
echo $res["score"];
}[/PHP]
This, by some crazy therory, should display the name and score of one person in my database.
This is where $sname="Test" (an existing user)
the database has 2 columns Name and Score. hi is the table's name.
Why doesn't this work? I am only a novice in PHP...
TA, Snaked
{
$query="SELECT score FROM hi WHERE name='$sname'";
$scre=mysql_que ry($query);
$res=mysql_fetc h_array($scre,M YSQL_ASSOC);
echo $sname;
echo $res["score"];
}[/PHP]
This, by some crazy therory, should display the name and score of one person in my database.
This is where $sname="Test" (an existing user)
the database has 2 columns Name and Score. hi is the table's name.
Why doesn't this work? I am only a novice in PHP...
TA, Snaked
Comment