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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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