Page 1 of 1
links
Posted: Tue Mar 07, 2006 2:26 pm
by PHPNERD
Is there a way to store links inside a mysql database? I want to display each different link as the word "preview" for the products I sell. I could make a field and have "preview" for each item, but then how could i assign a different link (each link would point to a dfiferent file) for each?
Posted: Wed Mar 08, 2006 8:14 am
by Grim...
Store all the product information in a database table with an ID, then use
Code: Select all
print "<a href=\"object.php?id=".$database_id_variable."\">Preview</a>";
Then build the object.php page using the information from the database, and the SQL you need will end
Code: Select all
$query= "...WHERE id = $"._GET['id'];