Forum Moderators: coopster
Firstly, variables from your form are accessed just as any other variable within your PHP script; so in your case, the variable $ordertype will hold the value you want to redirect based upon.
The PHP equivalent of a Response.Redirect is to use the header() [uk.php.net] function to set a location header, for example:
header("Location: /somepage.php");
or in your case...
header("Location: ".$ordertype);
The full stop in that code is the string concatenation operator.
Hope this helps!
or do I have to use a $_POST["ordertype"]
and do I have to set values by using
in my form like this..
<input type="radio" name="ordertype" value="<?= $quoteAS.php?>">
or can it just be value="quoteAS.php"
Try this:
<?php
if($ordertype!= "")
{
header("Location: " . $ordertype);
}
?>
<or do I have to use a $_POST["ordertype"]>
You will have to use this if "register globals" is turned off.
<and do I have to set values by using
in my form like this..
<input type="radio" name="ordertype" value="<?= $quoteAS.php?>">
or can it just be value="quoteAS.php">>
The latter is correct.