Help

I have this command in my HTML:

form name="" action="…/tracking.php" method=“POST”>
Tracking Order:


and the php is:

?>
$number = $_REQUEST[‘tracksubmit’] ;
if ($number == TEST1) print("<meta http-equiv=“refresh” content=“0; url=TEST!.html”> “);
else print(”<meta http-equiv=“refresh” content=“0; url=error.html”> ");
?>

My problm is, when I inster TEST1 in the label box of my HTML it is redirct me to tracking.php instead of TEST1.html

You are going to have to break this down further.

It is going to redirect to tracking.php, because that is where the form should be sent. Is the php code you posted not tracking.php?

A few things to note.

Don’t use request. Yes, it is an option, but $_POST and $_GET should be what you use in all cases. (For this type of data anyway.)

Your meta refresh: I don’t know the rest of the code so, I can’t say this for certain, but a header() function does this in php. Now, if that comes after any html it will not work, but as I said I can’t see the rest of the code.

Also regarding your meta tag… You have it redirecting to TEST!.html not TEST1.html.

Next The data coming through a form is going to be in a string, so

[php]$number == TEST1[/php] Is not going to test true as TEST1 is not the same as “TEST1” or ‘TEST1’

Sponsor our Newsletter | Privacy Policy | Terms of Service