i have a table called links Code (markup): and inside this table are the columns id name link type Code (markup): What i want to do is when i request the id it will display the rest of the column associated with that id. thanks
I just quickly wrote this up. (not tested) simply selects the column data requested by the ID. so... file.php?ID=the_id <? // clean the requested ID. $ID = abs((int) $_GET['ID']); // get the data using the where cluase from the requested ID. $q = mysql_query("SELECT * FROM links WHERE id='$ID'") or die(mysql_error()); echo "<table> <tr> <th>Link ID</th> <th>Name</th> <th>Link</th> <th>Type</th> </tr> "; while($cl = mysql_fetch_array($q)){ echo " <tr> <td>".$cl['id']."</td> <td>".$cl['name']."</td> <td>".$cl['link']."</td> <td>".$cl['type']."</td> </tr>"; } echo "</table>"; ?> PHP: Hope it helps