PHP beginner help
Posted: Thu Jul 02, 2009 8:14 pm
Hello, i just started to learn PHP and using a book (6 years old) to learn it, there's some code examples and i've been coding according to these examples today i just wrote this code but it doesn't work. The code is exactly same as the example code but it just doesn't work, can somebody help me? Here's the code:
Thanks!
Code: Select all
<html>
<head>
<title>Hello!</title>
</head>
<body>
<?php
if (empty($userName)) {
echo <<<HERE
<form>
Please enter your username:
<input type = "text"
name = "userName"> <br/>
<input type = "submit"
input value = "Enter">
</form>
HERE;
}
else {
echo "Hello $userName";
}
//end
?>
</body>
</html>