complete newbie help


#1

Hi,

I’m a php newbie, and I need some help. I’ve read a book about it and I feel fairly comfortable in my design skills, but I get a problem when I try to incorporate the php within my web page.

I have a sample html page:

[code]

Name: Age: [/code] and a sample php file: [code]

Welcome <?php echo $_POST["name"]; ?>.

You are <?php echo $_POST["age"]; ?> years old.

[/code]

It is supposed to display:

Welcome John.
You are 28 years old.

But, instead it opens the download manager and prompts me to open the php script with emacs text editor.

Anybody have any ideas on why this is happening? I’m opening the html file from my desktop rather than from an actual server if that makes a difference.

Thanks,

Patrick


#2

It does :wink: PHP is supposed to be parsed and only a server program (such as Apache or IIS) could have it parsed by the PHP engine.


#3

Patrick,
Please do some research in to Server-Side scripting languages. I think you will find that once you get an understanding of this you will have a good understanding of how php works along with various other web langauges.


#4

Thanks everybody… I guess I’ll hit the books again.