dean7 Posted April 23, 2009 Share Posted April 23, 2009 Hi on my website i have a link so you can see every member thats on that website and when you click the name it shows the profile. I have changed then template / look of it when you click on the user profile but i get this error. Parse error: syntax error, unexpected T_LNUMBER in /home/a6651052/public_html/members.php on line 51 <? ob_start(); include("config.php"); if (!$_GET[user]) { $getuser = mysql_query("SELECT * from users order by id asc"); while ($user = mysql_fetch_array($getuser)) { // gets all the users information. echo ("<a href=\"members.php?user=$user[username]\">$user[username]</a><br />\n"); // links to a page to view the user's profile. } } ELSE { $usernum = mysql_num_rows($getuser); if ($usernum == 0) { echo ("User Not Found"); } else { $profile = mysql_fetch_array($getuser); echo ("<table width="500" border="1">; <tr> <td bgcolor="#990000"> <center>$profile[username]'s Profile:</center></td> </tr> </table> <table width="500" border="1"> <tr> <td> Username: $logged[username]</td> <td> Last Login: 00-00-0000</td> </tr> <tr> <td> Reg Date: 00-00-0000</td> <td> Location: $profile[location]</td> </tr> <td> Msn: $profile[msn]</td> <td> Aim Messanger: $profile[aim]</td> </tr> <tr> <td> Emial: $profile[email]</td> <td> Friend?</td> </tr> <tr> </table> <table width="500" border="1"> <tr> <td bgcolor="#990000"> <center><b>Content</b></center></td> </tr> </table> <table width="500" border="1"> <tr> <td> $profile[content]</td> </tr> </table>"); } } ?> Please Help Thanks Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/ Share on other sites More sharing options...
mikesta707 Posted April 23, 2009 Share Posted April 23, 2009 which line is line 51 in the code you posted. Im not going to count them by hand Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/#findComment-817816 Share on other sites More sharing options...
PFMaBiSmAd Posted April 23, 2009 Share Posted April 23, 2009 There may be other problems, but you have got double-quotes inside of a double-quoted string. You either need to escape them or use single-quotes. Edit: and the posted code produces an entirely different error message on a different line than what you posted, so either the code or the error does not match what you are expecting help with. Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/#findComment-817817 Share on other sites More sharing options...
dean7 Posted April 23, 2009 Author Share Posted April 23, 2009 echo ("<table width="500" border="1"> << line 51 Starting the table. Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/#findComment-817818 Share on other sites More sharing options...
dean7 Posted April 23, 2009 Author Share Posted April 23, 2009 Sorted now thanks Had to change " to ' and just change a bit of code Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/#findComment-817822 Share on other sites More sharing options...
mrMarcus Posted April 23, 2009 Share Posted April 23, 2009 for people who don't indent, you should at least make life a little easier on youself and look into variable interpolation .. not a good practice for people just starting out, but if you're not going to indent... <?PHP //stuff here... echo <<<HTML <table width="500" border="1"> <tr> <td bgcolor="#990000"> <center>$profile[username]'s Profile:</center></td> </tr> </table> <table width="500" border="1"> <tr> <td> Username: $logged[username]</td> <td> Last Login: 00-00-0000</td> </tr> <tr> <td> Reg Date: 00-00-0000</td> <td> Location: $profile[location]</td> </tr> <td> Msn: $profile[msn]</td> <td> Aim Messanger: $profile[aim]</td> </tr> <tr> <td> Emial: $profile[email]</td> <td> Friend?</td> </tr> <tr> </table> <table width="500" border="1"> <tr> <td bgcolor="#990000"> <center><b>Content</b></center></td> </tr> </table> <table width="500" border="1"> <tr> <td> $profile[content]</td> </tr> </table> HTML; //stuff here... ?> and when using opening php tags, use <?php instead of just <? Link to comment https://forums.phpfreaks.com/topic/155417-solved-help-with-members/#findComment-817824 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.