Jump to content

PHP hyperlinks - whats wrong with this?


roll_or_die

Recommended Posts

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'].'?>&amp">'.$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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...