Jump to content

LCrane86

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by LCrane86

  1. Thanks for your help, but I'm still not successful in sorting this. The generic links page is here: http://www.space.greensenvironmental.com/all_loads.php (just provides all records in the load table.) It should forward the $clickid into the next page(, but it doesn't. I've noticed the address bar at the bottom fails to show $clickid within " load_info.php?id=$clickid" - unless I do a injection attack in the address bar, it emerges with the id number. All Loads $SQL = "SELECT * FROM loads"; $result = mysql_query($SQL); while ($db_field = mysql_fetch_assoc($result)) { $clickid = $_GET['id']; print $db_field['id'] ."<a href=\"load_info.php?id=$clickid" . $id . "\" target=\"_self\" title=\"\">More Info</a>;"; print $db_field['depart:'] . "<BR>"; print $db_field['dest'] . "<BR>"; print $db_field['depart_date'] . "<BR>"; print $db_field['dest_date'] . "<BR>"; } mysql_close($db_handle); And the second page doesn't seem to 'grab' the $clickid var $var = $_GET['id']; echo $var; Something so small is really stopping my progress! L.
  2. Hello, I'm trying to build a small project; and as part of it - I want users to search and when presented with relevant enteries in the SQL database - they should be able to click and retrieve a page dedicated to that entity. The problem I am having is in passing the 'id' of the search result onto the next (description) page. $SQL = "SELECT * FROM loads"; $result = mysql_query($SQL); while ($db_field = mysql_fetch_assoc($result)) { $clickid = $_GET['id']; print $db_field['id'] ."<a href=\"load_info.php?id=$id" . $id . "\" target=\"_self\" title=\"\">More Info</a>;"; print $db_field['depart:'] . "<BR>"; print $db_field['dest'] . "<BR>"; } I thought it was easy enough to pass the variable like above ("load_info.php?id=$id) and then grab it on the next page like so: $val = $_GET['clickid']; Unfortunately, it doesn't retrieve the info from the page before. If I insert a number in there, it does work correctly, but I really need the ID of the database entry to pass on so as to provide the user with further information. If anyone could help it would be appreciated. L.
×
×
  • 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.