Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
why it consists errors even though it's correct
nazim mahied
Nov 3 2013 12:49 AM
1k
Reply
<?php
$num1=$_POST['num1'];
$num2=$_POST['num2'];
$func=$_POST['func'];
$submit=$_POST['submit'];
if(submit == false ){
include ('cool.php');
}
else if ($func == add){
include ('cool.php');
$num3=$num1+$num2;
echo"<b><b>";
echo"<b>solution</b>:";
echo"<b>";
echo"$num1+$num2=$num3";
}else if ($func == sub)
{
include ('cool.php');
$num3=$num1-$num2;
echo"<b><b>";
echo"<b>solution</b>:";
echo"<b>";
echo"$num1-$num2=$num3";
}else if ($func == mul)
{
include ('cool.php');
$num3=$num1*$num2;
echo"<b><b>";
echo"<b>solution</b>:";
echo"<b>";
echo"$num1 x/*$num2=$num3";
}else if ($func == div)
{
include ('cool.php');
$num3=$num1/$num2;
echo"<b><b>";
echo"<b>solution</b>:";
echo"<b>";
echo"$num1/$num2=$num3";
};
?>
the output has errors even though I'm sure it's correct plz help me out
the errors
Notice: Use of undefined constant submit - assumed 'submit' in C:\wamp\www\the test\verb.php on line
7
Call Stack
#
Time
Memory
Function
Location
1
0.0380
147384
{main}( )
..\verb.php
:
0
( ! )
Notice: Use of undefined constant add - assumed 'add' in C:\wamp\www\the test\verb.php on line
10
Call Stack
#
Time
Memory
Function
Location
1
0.0380
147384
{main}( )
..\verb.php
:
0
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
what data type is used for store large text in mysql
updateing session variables on check box click.