Jump to content

$_post errors, works in FF, not in IE8


lupld

Recommended Posts

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]

Link to comment
Share on other sites

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]

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.