Jump to content

[SOLVED] I don't know where to start


Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/60684-solved-i-dont-know-where-to-start/
Share on other sites

<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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.