lupld Posted March 9, 2010 Share Posted March 9, 2010 Ok, doing a satire project where I'm mocking an IE8 opening a url and it being blocked to do government zealotry. I have it all about done, but I want to make two versions, an internet emulator, and the redirect one I just mentioned. It works in firefox, but in IE8 it acts as if the submit button wasn't pressed when it loads the page. I think it's an error with how I handled the form, or the $_POST in php. Anyone know why this works in Firefox exactly how it should and not at all in IE8? I thought php handling was browser independant, it should grab the $_POST, put the links in how it should, and load the "fake browser". Here are all the files, this is just a school project, and I don't care who rips off the code, I think it's a neat little project. Here is the code just in case someone is curious and doesn't wanna download the source files.. <?php if(isset($_POST['Submit'])) { $url = $_POST['URL']; }else{ $url = "http://www.google.com"; } if(stristr($url,"http://")){ }else{ $url = "http://".$url; } ?> <html> <div id="IE-LOGIN"><form method="post" action="index.php"> <input id="IE-LOGIN-INPUT" type="text" name="URL" value="<?php PRINT "$url"; ?>" /> <input type="submit" value="Submit" name="Submit" style="display:none;" /> </form> </div> </html> On a side note, could this be IE8's anti-phishing software? I just need it to work for a school project, if I have to use Firefox in the end, I suppose I will, but it will be easier not to install a new browser just to turn in the project. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/194581-_post-errors-works-in-ff-not-in-ie8/ Share on other sites More sharing options...
lupld Posted March 9, 2010 Author Share Posted March 9, 2010 I'm wondering if maybe the url for "name" is reserved in IE8, as part of a security feature. I'm gonna rename the input values. Quote Link to comment https://forums.phpfreaks.com/topic/194581-_post-errors-works-in-ff-not-in-ie8/#findComment-1023339 Share on other sites More sharing options...
lupld Posted March 9, 2010 Author Share Posted March 9, 2010 No luck, works like it should in Firefox, selects the url value for when submit is not set for IE8. Quote Link to comment https://forums.phpfreaks.com/topic/194581-_post-errors-works-in-ff-not-in-ie8/#findComment-1023340 Share on other sites More sharing options...
lupld Posted March 9, 2010 Author Share Posted March 9, 2010 This is probably terribly coded, but it works. Use index.php?durl=yahoo.com or google.com or something to load the page the first time. Then after that the form works fine for both. Here is the final PHP <?php //if(isset($_POST['Submit'])) // { $dlin = $_POST['dlin']; // }else{ // $dlin = "http://www.google.com"; // } if(isset($_GET['durl'])){ $url2 = $_GET['durl']; if(stristr($url2,"http://")){ }else{ $url2 = "http://".$url2; } }else{ if(stristr($dlin,"http://")){ }else{ $dlin = "http://".$dlin; } } ?> And the places the link needs to be included now look like this... <?php PRINT "$dlin"; PRINT "$url2"; ?> and cause I'm a nice guy, and I like this little project, here, have the newly finished index.php [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/194581-_post-errors-works-in-ff-not-in-ie8/#findComment-1023349 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.