marklarah Posted January 26, 2008 Share Posted January 26, 2008 <?php include_once 'top.php'; ?> <?php include 'dbs.php'; ?> <html> <title>User Info</title> <body bgcolor="#000000" valign="top"> <p>Hi</p> <table width="900" align="center" border="0" valign="top"> <tr> <td width="100%" height="133"> <img src="top.gif" width="900" height="133"></td> </tr> <tr> <td width="100%" height="30" bgcolor="#333333"> <font color="#FFFFFF" face="Bell MT, Bahtang, Helvetica"><? include 'bar.php'; ?></font> </td> </tr> <tr> <td width="100%" bgcolor="555565" valign="top"> <table border="0" valign="top" valign="top"> <tr> <td valign="top"> <?php if (!isset($_GET['id'])){ echo "You need to supply a valid user ID"; exit; }else{ $quser = $_GET['id']; } $resultghg="SELECT * FROM `users` WHERE ID = '$quser'"; $articlesghg = mysql_query($resultghg) or die(mysql_error()); $numbghg = mysql_num_rows($articlesghg); $name = $row['username']; $email = $row['email']; $lastactive = $row['llin']; $level = $row['level']; $qrypr = mysql_query("SELECT * FROM `ranks` WHERE `number` = '$level'"); $rowqpr = mysql_fetch_array($qrypr); $qrank = $rowqpr['title']; if ($numbghg != 1){ echo "You need to supply a valid user ID"; exit; } ?> <font face="Arial, Helvetica"><h1>User: <? echo $name; ?> <hr width="300" color="white" align="left"></h1></font><br> <table valign="top"> <tr> <td width="17">   </td> <td> <table border="0" cellpadding="0" cellspacing="0" width="504" align="left" valign="top"> <tr> <td><img src="images/spacer.gif" width="45" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="226" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="233" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r1_c1" src="images/art_r1_c1.png" width="504" height="11" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="11" border="0" alt=""></td> </tr> <tr> <td><img name="art_r2_c1" src="images/art_r2_c1.png" width="45" height="26" border="0" alt=""></td> <td valign="top" bgcolor="#999999"><p style="margin:0px"> <b> <font size="+1" face="Century Gothic, Arial, Comic Sans MS, Helvetica">User: <? echo $name; ?></font></b></p></td> <td><img name="art_r2_c3" src="images/art_r2_c3.png" width="233" height="26" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="26" border="0" alt=""></td> </tr> <tr> <td><img name="art_r3_c1" src="images/art_r3_c1.png" width="45" height="17" border="0" alt=""></td> <td colspan="2"><img name="art_r3_c2" src="images/art_r3_c2.png" width="459" height="17" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="17" border="0" alt=""></td> </tr> <tr> <td colspan="3" background="images/art_r4_c1.png"> <table width="464" border="0" align="center" valign="top"> <tr> <td valign="top"> <font face="Verdana, Helvetica, Trebuchet MS, Comic Sans MS, Arial"> <table align="center" border="0" width="100%" valign="top"> <tr><td align="left"><b>Username:</b></td><td align="right"><?php echo $name; ?></td></tr> <tr><td align="left"><b>Level:</b></td><td align="right"><? echo $level; ?></td></tr> <tr><td align="left"><b>Rank:</b></td><td align="right"><? echo $qrank; ?></td></tr> <tr><td align="left"><b>Email:</b></td><td align="right"><? echo $email; ?></td></tr> <tr><td align="left"><b>Last Active:</b></td><td align="right"><? echo $lastactive; ?></td></tr> </table> </font> </td> </tr> </table> </td> <td><img src="images/spacer.gif" width="1" height="39" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r5_c1" src="images/art_r5_c1.png" width="504" height="41" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="41" border="0" alt=""></td> </tr> </table></td></tr></table> </td> <td width="20">   </td> <td width="310" align="right" valign="top"> <? include 'side.php'; ?> </td> </tr> </table> </td> </tr> </table> <?php include 'footer.php'; ?> </body> </html> It doesn't display any of the php variables. Do you know why? Is it some syntax? Quote Link to comment https://forums.phpfreaks.com/topic/87978-solved-whats-wrong/ Share on other sites More sharing options...
pocobueno1388 Posted January 26, 2008 Share Posted January 26, 2008 You never define the $row variable. change your code to this <?php $resultghg="SELECT * FROM `users` WHERE ID = '$quser'"; $articlesghg = mysql_query($resultghg) or die(mysql_error()); $numbghg = mysql_num_rows($articlesghg); $row = mysql_fetch_assoc($articlesghg); //added this line ?> Quote Link to comment https://forums.phpfreaks.com/topic/87978-solved-whats-wrong/#findComment-450135 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.