Here's my HTML code:
<form method = "get" action = "PHPFile.php">
Type:<select name = "type">
<option value = "1">1</option>
<option value = "1">2</option>
<option value = "1">3</option>
</select>
Your Type:<input type = "text" name = "yourType" value = "$varType;">
Fee:<input type = "text" name = "fee" value = "$varFee;">
</form>
I want to get the value of my select "type" and pass it to my textbox "yourType".
And each type options has corresponding fees:
For Type 1 = 250
Type 2 = 90
Type 3 = 90
Here is my Php code:
<?php
$varType = $_GET("type");
if($varType == 1){
$varFee = 250;
}
else {
$varFee = 90;
}
?>
But I always get an parse error on getting the value of $varType