the boogyman
New member
with this PHP code ? Ok ... I have created just one form that enters a code and depending on the specific area codes , it will display the price per weight of what you want to be shipped .. but wen I click on the SUBMIT BUTTON , NOTHING gets displayed on the PHP form .. Nothing at all .. Help would be very much appreciated .
Here is the FORM code :
<html>
<head> <title> form </title> </head>
<body>
<h1> Please select a status code or enter a bank balance </h1>
<form action="region.php" method="post">
Enter area code : *
<input type="text" name="areacode" size="20" /> <br />
<input type="submit" value="Check status" />
<input type="reset" value="Clear form" />
</body>
</html>
HERE is the PHP code
<html>
<head> <title> Change Cash Calculator </title> </head>
<body>
<?php
if ($areacode == 508 || $areacode == 617)
{
$switchcase =1;
}
else if($areacode == 207 || $areacode == 603)
{
$switchcase =2;
}
else ( $areacode == 404 || $areacode == 706)
switchcase = 3;
switch($switchcase)
{
case 1:
echo " The price of the following location is going to be : $2.50 per pound ";
break;
case 2:
echo " The price of the following location is going to be : $ 3.50 per pound";
break;
case 3:
echo "The price of the following location is going to be : $ 5.00 per pound";
}
?>
</body>
</html>
Here is the FORM code :
<html>
<head> <title> form </title> </head>
<body>
<h1> Please select a status code or enter a bank balance </h1>
<form action="region.php" method="post">
Enter area code : *
<input type="text" name="areacode" size="20" /> <br />
<input type="submit" value="Check status" />
<input type="reset" value="Clear form" />
</body>
</html>
HERE is the PHP code
<html>
<head> <title> Change Cash Calculator </title> </head>
<body>
<?php
if ($areacode == 508 || $areacode == 617)
{
$switchcase =1;
}
else if($areacode == 207 || $areacode == 603)
{
$switchcase =2;
}
else ( $areacode == 404 || $areacode == 706)
switchcase = 3;
switch($switchcase)
{
case 1:
echo " The price of the following location is going to be : $2.50 per pound ";
break;
case 2:
echo " The price of the following location is going to be : $ 3.50 per pound";
break;
case 3:
echo "The price of the following location is going to be : $ 5.00 per pound";
}
?>
</body>
</html>