actually the code that i posted was the section before validating your form. she does have a section on that; however, she makes it kind of confusing.
Up until now, she has you build two files - one an html file and the other a php file that does the scripting. In the section on form validation however, she has you build one file - a php file and create your entire form as a variable and add a bunch of if and else statements that send up red comments if data isn't entered. Is that normal to build only one file? or can you do form validation when you have two files? Maybe not...since the original file is html and you need to do the form validation in php......
very basic question
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Typically, we suggest that it all be done in one file, but technically, when you separate form from function, it can span across multiple files. I'm not exactly sure what the example you are referring to works like, as the mixture of a static HTML file and a processing PHP file isn't something I've tried in that sense.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA