<html>
<head>
<h1>Welcome</h1>
<h2>back</h2>
<form action='get.php' method='GET'>
Name: <input type='text' name='fname' /><br>
Age: <input type='text' name='age' />
<input type='submit' value ='clik here' />
</form>
</head>
</html>
<?php
$fname = $_GET['fname'];
$age = $_GET['age'];
if ($fname && $age)
echo "your name is. $fname , and your age $age <br>";
echo date ("m/y/d");
echo "<br>";
$tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
echo "Tomorrow is ".date("Y/m/d", $tomorrow);
?>
the code above works , but i have no idea how come theres still an error message after. though i already declared the $fname and $age.
Notice: Undefined index: fname in C:\xampp\htdocs\xampp\get.php on line 17
Notice: Undefined index: age in C:\xampp\htdocs\xampp\get.php on line 19
04/11/20
Tomorrow is 2011/04/21
thanks :)