roll_or_die Posted February 19, 2007 Share Posted February 19, 2007 Im trying to set up a page which will bring up a list of all of the members on my website and set each persons name as a hyperlink to their profile. but whenever you click on the persons name to go to their profile the page just appears blank, at the moment its supposed to just show their username.here is the code of members_view.php: <?php include "conn.php"; $res=mysql_query("SELECT * FROM members"); while($row=mysql_fetch_array($res)) { echo '<a href="view_profile.php?id=<?='.$row['id'].'?>&">'.$row['username'].'</a><br>'; } ?> here is the code for view_profile.php: <?phpinclude "auth.php";include "conn.php";$member = $_GET['id'];$result=mysql_query ("SELECT * FROM members WHERE id = '$member'");while($row=mysql_fetch_array($result)) { echo "<b>".$row['username']."</b><br>"; }?> any help?thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2007 Share Posted February 19, 2007 The link is wrong, you have PHP tags in there. It should be like this:echo '<a href="view_profile.php?id='.$row['id'].'">'.$row['username'].'</a><br>'; Link to comment Share on other sites More sharing options...
roll_or_die Posted February 19, 2007 Author Share Posted February 19, 2007 ahhh thanks, it works! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now