errietta Posted August 5, 2008 Share Posted August 5, 2008 Hello this is my code $sql9="SELECT * FROM `tinyclub_users` WHERE `user_name`='$n'";$result9=mysql_query($sql9);$row9=mysql_fetch_array($result9);$pos9=$row9['user_position'];if ($pos9==1){echo "You have beaten a tournament!";exit;} I have tried to echo $pos9; but it doesn't work at all! It's nullI echoed $sql9; and the output works in phpmyadmini have also tried $sql9="SELECT * FROM `tinyclub_users` WHERE `user_name`='$n'";$result9=mysql_query($sql9);while ($row9=mysql_fetch_array($result9)){$pos9=$row9['user_position'];}if ($pos9==1){echo "You have beaten a tournament!";exit;} It just wont workPlease help me Link to comment Share on other sites More sharing options...
Ingolme Posted August 5, 2008 Share Posted August 5, 2008 Is $pos9 "NULL" in capital letters or does it show something else when you echo it? Link to comment Share on other sites More sharing options...
errietta Posted August 5, 2008 Author Share Posted August 5, 2008 NEVERMIND, I found it... I had forgotten to connect to the DB... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.