Here's my problem.. and I'm sure it's because I'm not quite grasping the passing of variables. MY MySQL Setup: I have 1 table called table1. It has 2 columns which are: 'Title' & 'Description' My Index.php Page: I connect to mysql. I pull the 'Title' from MySQL and loop it to produce 100 rows of data that fill my index page, as expected. My Problem: I now want to be able to click one of those rows and dynamically create a new page (description.php) that includes the 'Title' & 'Description'. My Progress: I've managed to click a row and create a hyperlink to mysite.com/title (where 'title' is pulling the 'title' from the mysql db) but I all I get is page not found. My Question: How do I tell description.php to pull the 'Title' and 'Description' and link to it from index.php? My Gratitude: Thanks in advance!
From my POV, there are 2 ways of achieving this: Either you need to pass the values of title and description in the url parameter http://mysite.com/description.php?title=XYZ&description=My description [You need to encode the url in your index.php and decode it in your description.php page. Could also use base64_encode] OR assuming the "title" field is unique in your DB table.. In your description.php you need to query your database for the "title" and get the description. http://mysite.com/description.php?title=XYZ However if you want the URL structure to be same as you posted (mysite.com/title) then you need to create .htaccess file to recognize this url structure in your web server as the other member stated over here...