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. Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.