leblanc Posted December 17, 2010 Share Posted December 17, 2010 Hello everyone, I am in need of some help I have been trying to figure out how to display a page with a unique url by the submission_id of a table. Example: www.mysite.com/display.php?id=4 I figured out how to display the tables information stored in the database through the submission_id with: WHERE submission_id='4' But I need figure out how to create a unqiue url by using the submission_id=4.... Here is what I started with to display the table with the submission_id=4 on display.php Thanks in advance for any help. <?php $username = "s52_tools"; $password = "gss"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); print "Connected to MySQL<br>"; $selected = mysql_select_db("s52_form",$dbh) or die("Could not select s52_form"); $data = mysql_query("SELECT * FROM ft_form_1" WHERE submission_id='4'") or die(mysql_error()); Print "<div id=\"container\">"; while($info = mysql_fetch_array( $data )) { Print "<br />"; Print "<b>Name:</b>" .$info['col_2'] . "<br />"; Print "<b>Email:</b>" .$info['col_3'] . "<br />"; Print "<b>Phone:</b>" .$info['col_4'] . "<br />"; Print "<b>Phone2:</b>" .$info['col_5'] . "<br />"; Print "<b>Subject:</b>" .$info['col_6'] . "<br />"; Print "<b>Blob:</b>" .$info['col_7'] . "<br />"; Print "<b>Date:</b>" .$info['submission_date'] . "<br />"; } Print "</div>"; ?> Link to comment https://forums.phpfreaks.com/topic/222018-unique-url-displayed-by-submission-id/ Share on other sites More sharing options...
leblanc Posted December 18, 2010 Author Share Posted December 18, 2010 So ideally, I have gotten my self to add this: $submission_id = $_GET['id']; and this: $data = mysql_query("SELECT * FROM ft_form_1" WHERE id='$submission_id'") or die(mysql_error()); But I still cannot get it work. I think I am on the right path, but am lost. Link to comment https://forums.phpfreaks.com/topic/222018-unique-url-displayed-by-submission-id/#findComment-1148842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.