Member Avatar for ragnarok511

I am kind of new to php. However, I created a form in html and the form action is linked to a php which all on the localhost. When I run the html file enter in information and hit submit. A window pops up and asks me if I want to open my php file. It gives me the option of saving the file or opening it with a IDE that I have on my computer.

I am using Ubuntu 9.10 64-bit with an Apache Server installed, btw.

Thanks.

Make sure you have PHP installed from www.php.net otherwise the server will treat the php file as any other unknown file and ask to download it.

Member Avatar for ragnarok511

Make sure you have PHP installed from www.php.net otherwise the server will treat the php file as any other unknown file and ask to download it.

Thanks but I got php 5.2.10 off of synaptic package manager. Does that matter? Whenever I launch a php script through local host it works just fine.

Thanks but I got php 5.2.10 off of synaptic package manager. Does that matter? Whenever I launch a php script through local host it works just fine.

php code works on server.
so whenever u open php file directly in browser it will ask you to download it ,
but when you will open it on server or localhost it will work fine
This is nature of php

Member Avatar for ragnarok511

I appreciate everyone's input. I was going to though localhost in my browser. What I did was open the php file first, then closed that and went to the html file and opened that through the local host and it worked like a charm.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.