Hi geeks,
I am working on a query string but I am kinda stuck with the code, I guess this is so cos am a PHP beginner. I want my script to display members list from a table in my db and attach a hyperlink to it so that when a user clicks on the link, it takes him to the full details of that member. So far, I have been able to retrieve data from db and attached links but when I click on the link,it just adds a member ID to the query string and it does not take u to page with full member details. What I have wirtten so far is shown below:
<?php
//connection.php
$conn = mysql_connect($host, $user, $pass);
$selDB = mysql_select_db($db);
$sql = "select count(*) from info";
$result = mysql_query($sql);
$row = mysql_fetch_row($result);
$numRows = $row[0];
$sql = "select * from info";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result)){ ?>
<table>
<td><?php echo stripslashes($row['name']). " ";?><a href="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $row['id'];?>">[View Details]</a>
</td>
</tr>
<?php } ?>
Guys please help me out.