flowingwindrider Posted July 19, 2007 Share Posted July 19, 2007 I have no idea even where to begin on this one: I have a classified ads page that lists just a few fields from each row of a database. I need the user to be able to click a link for each displayed row that will take them to a page with the full information from that row. If anyone can even tell me the name for this process then I can google it and find a tutorial, but I just don't have a clue. Further explanation: 1st page: a table that lists a unique id for each Ad, the type of job it lists, and the date it was posted. Next to this is the word 'details', which I would like to become the link to the 2nd page: For each unique id I want to display all the rest of the information for the listing such as wage, address, phone #, etc. Can anyone give me a starting poing? Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 19, 2007 Share Posted July 19, 2007 <a href="details.php?id=27">details</a> Then on details.php ... <?php $id = $_GET['id']; // make database connection // select database $query = "SELECT * from tablename WHERE id = '$id'"); $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); // display $row array variables to suit // link to previous page Quote Link to comment Share on other sites More sharing options...
flowingwindrider Posted July 19, 2007 Author Share Posted July 19, 2007 Ok, I think I get the basic idea and can play with this. Thanks as always for coming through for me! Quote Link to comment 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.