I don’t understand the difference between php and html in terms of creating forms. Is it ok to create html files and use php in them to transfer data across multiple page forms or should this be done vice versa with php files having html in them?

Long answer:
PHP must be in a .php file in order for it to be processed. HTML however can be output from any file (within reason of course). Therefore if you only want to output HTML, sure, just use a .html - however, if you want any sort of PHP code to be processed, put all the code (PHP and HTML) into a .php file. In said file, just close the php tags and write the HTML as normal.

Short answer:
Use .php

If you want any more info let me know, my long answer was still shortened so as to not bore the living daylights out of you!

no that’s a great answer. that solves everything now. The sever that I have uploaded to has php built in and it works so I know that my php code will work. I guess my real problem I’m trying to solve is to get a session of variables stored across a multiple page form so the http won’t delete the data, and then at the end in a file called form_process.php, I want to take the sum of the data and enter it into an Access database. Could you help me with that?

I’m afraid I’ve only worked with MySQL, but you’re looking for ODBC connections - I do believe PHP has the capability built in, but exact usage is not something I can help you with.

I would recommend starting a new thread so as to get people’s attention, if they see how many replies this question has got, they won’t necessarily think to view it and see if any follow up questions have been asked.

Sponsor our Newsletter | Privacy Policy | Terms of Service