Hi
I want to start writing a new site. It will include 3 forms that will
collect information from the user. I know how to keep the info in
sessions etc. my question is about the design of the server side php
files. I don't want to design all three forms in one big file, id
rather have a separate php file for each form.
Say I have a file form1.php which creates the initial form, should I
say (form1 action="form1.p hp") and have the form validation code in
form1.php? If so how do I call form2.php from inside form1.php? Or do I
say(form1 action ="form2.php" ) and have my validation code for form 1
inside form2.php if so how do I call back form1 if validation fails
now this has been asked already (see link below)and it was suggested to
use the include() require() functions. but then others have argued
against it. so is includeonce() the most practical way or should I
rather write all the code in to one big index.php
I want to start writing a new site. It will include 3 forms that will
collect information from the user. I know how to keep the info in
sessions etc. my question is about the design of the server side php
files. I don't want to design all three forms in one big file, id
rather have a separate php file for each form.
Say I have a file form1.php which creates the initial form, should I
say (form1 action="form1.p hp") and have the form validation code in
form1.php? If so how do I call form2.php from inside form1.php? Or do I
say(form1 action ="form2.php" ) and have my validation code for form 1
inside form2.php if so how do I call back form1 if validation fails
now this has been asked already (see link below)and it was suggested to
use the include() require() functions. but then others have argued
against it. so is includeonce() the most practical way or should I
rather write all the code in to one big index.php
Comment