PHP Order Form

Two example PHP order forms are built using the PHP Form Class and the PHP Table Class. These lightweight classes can be used to generate order forms with logic separate from markup for cleaner code and easier customization and maintenance.

Documentation provides information on how the form and table classes are used to build order forms. The two examples presented online are included in a download.

About the Order Form Examples

Both order forms display a list of products and prices held in an array. They allow the user to select items, enter quantity, and view totals and subtotals. The order forms are JavaScript enhanced but not JavaScript dependent. They include some server-side validation.

Order form example one includes a standard PayPal button that sends the total and other order information to your account. The second example includes contact information fields and sends order information to an email address you specify.

Note: These order forms are presented as basic examples. They should not be assumed to be suitable for use in accepting payments on a live web site without prior review by a security professional.