Image

Imagexiolablux wrote in Imagephp

Newbie Help!!!!

Hi. I'm in the process of teaching myself PHP at work and I'm not getting very far. I'm ready to tear my hair out. I installed PHP 4.3.4 which i downloaded from the PHP site. I'm running IIS as my server on a WIN 2K Professional machine

I'm going through some tutorials and I'm saving all my files as .php into \Inetpub\wwwroot\test. The very basic scripts work when I open them from http://mycomputername.net/test/file.php, such as those involving echo and print or a basic variable that is used on the same page. However when I try to do something more adanced such as transferring a variable from one page to another it doesn't work.

Here is an exampe of what isn't working:

I create a form with this code

<form action="output.php" method="POST"/>
Your name: <input type=text name=name/>
Your age: <input type=text name=age/>
<input type=submit/>
</form/>

Then on my output page I have

Hi <$php echo $name?>. You are <$php echo $age?> years old.

However when the form is submitted and the ouput page is displayed, instead of replacing the variables with what was input on the form, I just get the code displayed (Hi <$php echo $name?>. You are <$php echo $age?> years old.)

I'm copying the code directly from a tutorial so I know it's right. I'm guessing I don't have something set up correctly with PHP or IIS. Any ideas? Keep in mind that I'm very new to all this so I'd appriciate very basic replies. Thanks!!!