Jump to content

displaying all database info from clicking a teaser


Meekay

Recommended Posts

Hello all.  I might be asking too much here, if so just tell me to sod off...

 

I have a page which displays teaser info (a name and a photo) from a list of records in a mysql database.  I would like the user to click the name and then be sent to another page which displays all of that given record's information...

 

This is all i have, just the code that brings up the list of names/photos.

 

<?php

$sql = "SELECT col_2, col_19 FROM ft_form_1";

$query = mysql_query($sql);

while($row = mysql_fetch_assoc($query)){

    echo $row['col_2'].'<br />';

    echo '<img width="100" height="100" img src="' . $row['col_19'].'"><br />';

}

?>

 

If you can, i'd be over the moon with some direction. 

 

Thank you,

 

 

make the php page that displays more detail about the user

 

link the username to that page by passing its id in the url userinfo.php?id=3

 

now on you userinfo page you have passed a variable named $id

 

you can run a query on your users table in mysql where userid = $id

hiya,

 

Thanks for the advice.  However, i'm not sure how to do this.

 

I know i'm not allowed to ask for code, but i'm going round in circles trying to google the answers and trying to apply tutorials to this specific situation.

 

The unique field in the database is "submission_id".

 

*lost*

 

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.