Learn how to check the file extension and MIME type of the uploaded (or any) file in PHP.
Author: BrainBell
Handling File Uploads
Learn how to upload files through an HTML form and save them somewhere on the server.
Form Validation
Form validation is one of the most important parts of a website, in this tutorial you’ll learn how to validate a form and how to display error messages with the form.
Preselecting Multiple Selection Lists
Learn how to use the <select>, <optgroup>, and <option> tags to create a single or multiple selection dropdown list. You’ll also learn how to use the “selected” attribute to preselect options in the select tag.
Preselecting Check Boxes
Let’s see how to return checked (or selected) checkboxes upon submitting a form. You’ll learn how to process individual or group (array) checkboxes with PHP.
Preselecting Radio Buttons
When submitting a form to the server, the value of the selected radio button is passed to the server. Compare that value, if it fits, print out “checked” to preselect that radio button.
Prefilling Text Fields
Learn how to fill fields with the submitted data. For example, when the password is wrong or the username is already taken. You’ll also learn techniques to prefill form by retrieving data from cookies that you saved in cookies on successful submission of the form.
Using Form Elements
Form elements are used for capturing user input. A form contains one or more elements, which are the fields where the user can enter data. When a user finishes entering the data, the form is submitted to the server for verification or storing of the data.
Passing Data with the HTML Forms
Both the GET and POST methods send data to the server, but which method should you use?
Passing User Data
In this tutorial, we discuss how to pass user data from a web browser to a PHP script. You will see how HTTP requests can include user data by creating URLs and embedding links in HTML documents.