PDA

View Full Version : $_SERVER['REQUEST_URI'] not working right in IE


wolfdogg
08-08-2009, 01:54 PM
when passing this to the front end's form action
$this->mAction = $_SERVER['REQUEST_URI'];
when loaded in IE, i get website.com/?item=item1
when loaded in FF i get website.com/index.php?item=item1

IE will not post the variables it just refreshes the page. is there a known bug about this in IE, or could it be something else.

i solved it like this, can this backfire on me? $this->mAction = $_SERVER['PHP_SELF'] . (isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : NULL);



OK< that wasnt the problem at all, i got the url to display correctly IE, but the variables will still not post. I have a img submit, and i do a hve a value in it, Any ideas as to why its doing this in IE where in FF the transaction is working flawlessly? <input type="image" src="images/blah.gif" name="FOO" value="BAR" />

how do i get this submit button to work in IE 7+

paul_norman_81
08-11-2009, 06:18 AM
Are you testing for FOO_x or FOO_y in the $_POST array? Image submits use them I think...

So $_POST['FOO'] will not exist but $_POST['FOO_x'] will I think. Could be wrong as I don't like image submits...

tartareandesire
08-12-2009, 10:45 AM
paul_norman_81 is probably correct. Check to see that your post check is correct. Browsers don't submit the same variables for an image submit. When using image submits it's better to use a hidden field for post submit checking.

scoutt
08-18-2009, 08:47 PM
and to a browser there is no difference between these two

when loaded in IE, i get website.com/?item=item1
when loaded in FF i get website.com/index.php?item=item1

Apache assumes you have a index.* in the folde rand it will load which ever one.

wolfdogg
08-27-2009, 05:31 PM
Of course, but it seemed that since that was the only thing i found to be different in the 2 pieces of code i suspected that i would test IE just to be sure.

So i had to prove that wrong, and i discovered that once i edited that line to insert the filename , and still had the same problem.


i did fix it a while back. cant remember what i did, it was a week ago. :-)