tonyking
03-28-2008, 07:03 PM
Please note, this is an old, existing post I am now having further problems with. This "simple" script is supposed to match a user inputted name, to a coresponding page.
This code is now presenting me with a problem in IE, and I can't for the life of me figure out why!? I am using a page called registry.php, here's the code:
<?php
if(isset($_POST['Submit'])){
$name = strip_tags($_POST['name']);
$name = strtolower($name);
switch($name){
case "haynes":
$page = 'haynes.html';
break;
case "bill":
$page = 'bill.html';
break;
case "bart":
$page = 'bart.html';
break;
default:
$page = "noregistry.html";
break;
}
header("Location:$page");
}
?>
And I am using the below form to post to the script.
<form name="Submit" method="post" action="registry.php">
<input type="text" name="name" class="cleardefault" size="20" value="Groom's Last Name" /><br />
<font size="-2" color="#0099FF">(Use ALL lowercase letters)</font><br /><br />
<input type="Submit" name="Submit" value="Submit" />
</form>
It works in firefox, and upon original testing, it worked in IE. Now when I test in IE it takes me to the registry.php page and stops. The script does not redirect to the appropriate case or page.
Here's the live example:
www.damartravel.com/honeymoons.html
You can see the form in the left hand column.
Here's the direct link to the page it should redirect to:
www.damartravel.com/haynes.html (http://www.damartravel.com/haynes.html)
Hopefully this is something silly, and one of you know what it is! lol... It's been driving me crazy all morning.
Thanks in Advance.
This code is now presenting me with a problem in IE, and I can't for the life of me figure out why!? I am using a page called registry.php, here's the code:
<?php
if(isset($_POST['Submit'])){
$name = strip_tags($_POST['name']);
$name = strtolower($name);
switch($name){
case "haynes":
$page = 'haynes.html';
break;
case "bill":
$page = 'bill.html';
break;
case "bart":
$page = 'bart.html';
break;
default:
$page = "noregistry.html";
break;
}
header("Location:$page");
}
?>
And I am using the below form to post to the script.
<form name="Submit" method="post" action="registry.php">
<input type="text" name="name" class="cleardefault" size="20" value="Groom's Last Name" /><br />
<font size="-2" color="#0099FF">(Use ALL lowercase letters)</font><br /><br />
<input type="Submit" name="Submit" value="Submit" />
</form>
It works in firefox, and upon original testing, it worked in IE. Now when I test in IE it takes me to the registry.php page and stops. The script does not redirect to the appropriate case or page.
Here's the live example:
www.damartravel.com/honeymoons.html
You can see the form in the left hand column.
Here's the direct link to the page it should redirect to:
www.damartravel.com/haynes.html (http://www.damartravel.com/haynes.html)
Hopefully this is something silly, and one of you know what it is! lol... It's been driving me crazy all morning.
Thanks in Advance.