Creating a web form with PHP

glc650

Senior member
Apr 4, 2001
294
0
86
I'm trying to create a form that posts to a .php page, then passess the values on to another .php page for further validation, if need be. I have the .html page created with the appropriate text fields (name, email, etc.) and it points to the first .php page, which is setup to verify that the required fields are filled. How do I pass this info on to the second .php page, which I'm setting up to validate other things with reg. expressions?

TIA>
 

kt

Diamond Member
Apr 1, 2000
6,015
1,321
136
I don't see why you can't do all the validations and the form creation on the same PHP page. But anyhow, if you are going to be only run the script on a server with PHP 4 or newer, I suppose passing the values thru session would be the easiest. Either that or you could pass them thru the query string if the script needs to be backward compatible.
 

glc650

Senior member
Apr 4, 2001
294
0
86
Thanks for the reply, kt...

You are right, I could process all validation on the main page, but I plan on expanding the form, maybe even to multiple .html pages, so I thought it would be best to set it up this way now.

Anway, PHP4 is what I'll be using, so how do I pass the values through a session?