Consolidating a PHP form request to one script

Important Suggestions

Writing two scripts to complete a request is very time consuming and hard to organize. Websites could have 10-20 different user interactions in a short period of time, meaning two times the 10-20 interactions would require their own scripts (20-40 scripts). This causes poor site performance and demands more of the programmers time to create and maintain the scripts.

Lesson

For this tutorial you will need a server to test your pages since PHP is a server sided language. If you do not have a hosting account or do not own a server consider installing and running WAMP server for free (Refer to home page). If your form is on an .html page this tutorial does not apply to you because straight HTML does not allow you to process information.
Error

You need to log into your account to post comments!Sign In

Comments: 1 comment posted


machineaddic4/6/12 2:42 AM

<p>Hi. The beginners will use this as copy/paste method and you didn&#8216;t have some user input validation. The &#8220;strlen&#8221; &#8220;validation&#8221; is not enough. This is just a feedback.</p>