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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.