Submit form

Submit to same page Simply remove the action=”” parameter and a form will be submitted to the same page. Any URL arguments will also be retained. If you want to submit to the same page but with any previous URL arguments removed: Auto Submit Auto submit when selecting an item in a select box Auto […]

Read More

Date input fields

Supported by some HTML5 browsers which will display a date picker datetime db field from date picker When handling form submission In the form

Read More

File upload

Including 1 or more files to be uploaded in a form The data encoding type enctype MUST be specified as "multipart/form-data": <form enctype="multipart/form-data" action="__URL__" method="POST"> You can include one or more files like this: <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> MAX_FILE_SIZE must precede the file input field <label>Send this file</label> <input name="file_uploaded1" type="file" /> Handling in PHP […]

Read More

Refresh after form POST

This is a solution to the problem of pressing refresh after posting a form causing a "resubmit form information message box" for the user.  This simply causes the page to reload and can be placed after handling the POST actions if ( isset($_POST[‘action’])) { //—– AFTER ANY POST RELOAD THE PAGE SO REFRESH CAN BE USED —– […]

Read More

Simple Site Log In Form

In the head of each page add this Note this must be before any html header are sent (i.e. in php code before html output) Use this as the log in page Use this as an optional log out page

Read More

Checkbox

Checkbox Example Handling in PHP Checkboxes with an array of values To get the values in PHP as say a comma separated string: Styling Checkboxes https://www.w3schools.com/howto/howto_css_custom_checkbox.asp

Read More