Probably a sytax problem with PHP? anyone like to check for errors?

?pathtotake?

New member
<?php
$val2 = 2.5;
$submit = isset($_POST['submit'])

if($submit) {
if(is_numeric($val1))
{
$val3 = $val1 * $val2;
}
else
$val3 = "Invalid number.";
}
?>
<form method="post" action="">
Enter value: <input type="text" name="value" /><br/>
Result: <input type="text" value="<?php
if(isset($val3))
echo $val3;
?>" name="result" disabled="disable"/><br/>
<input type="submit" value="Calculate" name="submit" />
</form>


I get this error:

Parse error: syntax error, unexpected T_IF in /home/a4579259/public_html/Calc.php on line 12
 
Back
Top