Brian Gagnon
New member
This is the error message:
Parse error: syntax error, unexpected T_IF in D:\UCWS01_data\localuser\UCWS01_197\Finals\BG_Calculation.php on line 19
Here is the PHP code:
<?php
/*This is the php code that makes the calculation that the form uses
to calculate the cose of the project*/
//Brian Gagnon
# 12/6/2010
$num1 = $_POST['num1'];
$num2 = 140;
$submit = isset($_POST['submit'])
if($submit) {
if(is_numeric($num1))
{
$a = $num1 * $num2;
echo "The cost of the project is " . $a;
}
else
{
$a = "Invalid number.";
echo . $a " is an invalid number";
}
}
echo "Use your browser's back button to return to the last page";
?>
I'm very lost the line that is giving me the error is:
if($submit) {
I have looked up reasons for this error and they state that something was either opened and not closed or closed and not opened. Please help.
Parse error: syntax error, unexpected T_IF in D:\UCWS01_data\localuser\UCWS01_197\Finals\BG_Calculation.php on line 19
Here is the PHP code:
<?php
/*This is the php code that makes the calculation that the form uses
to calculate the cose of the project*/
//Brian Gagnon
# 12/6/2010
$num1 = $_POST['num1'];
$num2 = 140;
$submit = isset($_POST['submit'])
if($submit) {
if(is_numeric($num1))
{
$a = $num1 * $num2;
echo "The cost of the project is " . $a;
}
else
{
$a = "Invalid number.";
echo . $a " is an invalid number";
}
}
echo "Use your browser's back button to return to the last page";
?>
I'm very lost the line that is giving me the error is:
if($submit) {
I have looked up reasons for this error and they state that something was either opened and not closed or closed and not opened. Please help.