Jump to content

not recieving passed variables


ksb24930

Recommended Posts

this is what the url looks like:

https://people.creighton.edu/~ksb24930/newrowingweb/Pictures/image.php?iid=6&tbl=imageb

this 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.