Forum Moderators: coopster
I will try again - here goes:
I have a php file which creates an array (think of a photo gallery). When you click on a particular image it brings up a larger image and more information about the listing.
The code I am using is as follows:
echo "<form action='file2.php?seq_id=$choice[$i]['seqno']' method='POST'>
<input type = image src='../photocatalog/thumbnails/{$choice[$i]['photoname']}'
name='seqno'
value='$seq_id'>
</form>"
(followed by a semicolon - maybe this is where I'm losing it?
It takes you off to file2.php and brings up a screen based on matching the key 'seqno' with the same key field in another sql table - at least it does this for Firefox and Safari. No problems, never fails!
But when I bring it up in IE7, it produces an error message 'no key passed', which come from this code in file2.php:
if(isset($_POST['seqno']))
{
$seq_id = $_POST['seqno'];
}
else
{
echo "no key passed";
}
include("dbstuff.inc");
...etc.
Two of us have been scratching our heads over this for two days with no light at the end of the tunnel. I also tried $_SESSION as an alternative to $_POST, thinking that a session variable might work better (I have the session_start() code at the beginning of the program, and can pass other SESSION variables. But I can't figure out whether it is possible to use this successfully within an array. $_POST looks like the best bet if it can be made to work.
I'm sure (I hope) the answer is simple, and that I'm just doing something stupid.
If you have seen this before, and can offer any suggestions either with $_POST or $_SESSION, I would be VERY grateful.