ksb24930 Posted November 11, 2006 Share Posted November 11, 2006 this is what the url looks like:https://people.creighton.edu/~ksb24930/newrowingweb/Pictures/image.php?iid=6&tbl=imagebthis is what the code looks like (some of it):$conn = mysql_connect("datastore.creighton.edu", "rower", "ksb42685") OR DIE (mysql_error());@mysql_select_db ("crew", $conn) OR DIE (mysql_error());$table = $_REQUEST["tbl"];$id = $_REQUEST["iid"];if ($id=="") { echo "No userid given"; exit();}$table = $_REQUEST["tbl"];$id = $_REQUEST["iid"];if ($tbl=="") { echo "No table given"; exit();}$sql = "SELECT * FROM imagec WHERE image_id=".$_GET["iid"];-----------------------------------i get a "no table given" message...-------------------------------------here are my problems/questions:1. why isn't $table getting defined when it is in the url?2. I have experiemented changing the ".$_get["iid"]" t0 $id and the code breaks down. Link to comment https://forums.phpfreaks.com/topic/26947-not-recieving-passed-variables/ Share on other sites More sharing options...
Orio Posted November 11, 2006 Share Posted November 11, 2006 You havent set a variable called [b]$tbl[/b]. You've set a variable called [b]$table[/b].:)Orio. Link to comment https://forums.phpfreaks.com/topic/26947-not-recieving-passed-variables/#findComment-123213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.