adamjones Posted November 27, 2008 Share Posted November 27, 2008 Hi. I have this code; <?php mysql_connect("localhost", "designby_x", "password") or die(mysql_error()); mysql_select_db("designby_x") or die(mysql_error()); $result = mysql_query("SELECT * FROM members") or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { if($row['frozen'] == 'yes' WHERE ($row['username'] == '$myusername' { header('location:frozen.php'); } } ?> And I get this error; Parse error: syntax error, unexpected T_STRING in /home/designby/public_html/clients/home.php on line 14 Link to comment https://forums.phpfreaks.com/topic/134557-solved-can-someone-fix-this-code-please/ Share on other sites More sharing options...
.josh Posted November 27, 2008 Share Posted November 27, 2008 <?php mysql_connect("localhost", "designby_x", "password") or die(mysql_error()); mysql_select_db("designby_x") or die(mysql_error()); $result = mysql_query("SELECT frozen FROM members WHERE username = '$myusername' AND frozen = 'yes'") or die(mysql_error()); if (mysql_num_rows($result) > 0) { header('location:frozen.php'); } ?> Link to comment https://forums.phpfreaks.com/topic/134557-solved-can-someone-fix-this-code-please/#findComment-700615 Share on other sites More sharing options...
adamjones Posted November 27, 2008 Author Share Posted November 27, 2008 Cheers. All working now Link to comment https://forums.phpfreaks.com/topic/134557-solved-can-someone-fix-this-code-please/#findComment-700618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.