Hi Guys,
Big n00bie question here.
I'm putting together a PHP/SQL based helpdesk system here at work and I'm having some trouble getting it to run on a windows system.
I've tried e-novative WAMP and wamp from wampserver.com and neither of these seem to display PHP variables at all. they just leave them blank. So I tried uniform server from uniformserver.com and this actually seemed to work. Now I'm using a book to learn and it's called PHP5/MySQL Programming for the absolute beginner but when I get to a certain part the PHP stops working properly. Now I'll give the code and if somebody could tell me if it's my server or the code that's not right then I can continue with my project.
The code is this in a .html page:
<html>
<head>
<title>Password demo</title>
</head>
<body>
<h1>Password demo</h1>
<h3>Illustrates using one program to generate form and response</h3>
<?
if ($secret == null){
drawForm();
} else {
showResult();
} // end if
function drawForm(){
print <<<HERE
<h3>What's the secret password?</h3>
<form method = "post"
action = "password.php">
<input type = "password"
name = "secret">
<br>
<input type = "submit">
</form>
HERE;
} // end drawForm
function showResult(){
if ($secret == "PHP"){
print "<h1>Correct!</h1>";
} else {
print "<h1>Sorry, that was not correct</h1>";
print "please try again...<br>";
drawForm();
} // end if
?>
</html>
and the output is
this
I've uploaded a copy of my phpinfo here