View Single Post
Old 08-26-2003, 11:40 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
try this:

test.php
PHP Code:
<html>
<body>
<?
// condition if no name is entered
if(!$_POST['name'])
{
  echo 
"Please Enter Your Name Below.";
}
// if "o" is entered, greet O as MR.
elseif($_POST['name'] == "0")
{
  echo 
"Hi Mr. O";
}
// this is how you greet everyone else
else
{
  echo 
"wazzzzaaap $_POST['name']";
}
?>

<br><br>

<form action$_SERVER['PHP_SELF'] method=POST>
Name: 
<input type=text name="name"><input type=submit value="Go">
</form>

</body>
</html>
i like using lowercase for html.
__________________
Mike
sde is offline   Reply With Quote