jamesxg1 Posted January 25, 2009 Share Posted January 25, 2009 Here's the code: <?php $user_id = mysql_real_escape_string($_GET['id']); $sql = "SELECT * FROM `users` WHERE `id`='$id' LIMIT 1"; $query = mysql_query($sql); if(mysql_num_rows($query) > 0){ display content }else{ the user does not exist } ?> This is the error: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\profile.php on line 7 James. Link to comment https://forums.phpfreaks.com/topic/142399-solved-need-help-t_string-error-help-please-someone/ Share on other sites More sharing options...
gevans Posted January 25, 2009 Share Posted January 25, 2009 <?php $user_id = mysql_real_escape_string($_GET['id']); $sql = "SELECT * FROM `users` WHERE `id`='$id' LIMIT 1"; $query = mysql_query($sql); if(mysql_num_rows($query) > 0){ //display content }else{ //the user does not exist } ?> You need to comment your comments Link to comment https://forums.phpfreaks.com/topic/142399-solved-need-help-t_string-error-help-please-someone/#findComment-746088 Share on other sites More sharing options...
aximbigfan Posted January 28, 2009 Share Posted January 28, 2009 http://tinyurl.com/PHP-Parse Link to comment https://forums.phpfreaks.com/topic/142399-solved-need-help-t_string-error-help-please-someone/#findComment-748089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.