Forum Moderators: coopster

Message Too Old, No Replies

$ POST problem in Internet Explorer

         

blampyre

6:56 pm on Jan 19, 2009 (gmt 0)

10+ Year Member



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']

andrewsmd

7:46 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



More information is needed. You didn't even finish your form tag or say what you want to do.

blampyre

12:09 am on Jan 20, 2009 (gmt 0)

10+ Year Member


Thanks for replying. This is the first time I have used this site. I tried twice to include the whole message, but it kept getting cut off. I wasn't sure if I was looking at just a 'view' of my text, or whether it had really disappeared. So it was helpful to hear from you that it really was gone!

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.

Pico_Train

6:19 am on Jan 20, 2009 (gmt 0)

10+ Year Member



add this and see

<input type = "hidden" src='../photocatalog/thumbnails/{$choice[$i]['photoname']}'
name='seqno'
value='$seq_id'>

Maybe change the name of the image or hidden input for the post.