Categories
PHP

Validating Mime Type and Extension of File Uploads

Learn how to check the file extension and MIME type of the uploaded (or any) file in PHP.

Categories
PHP

Handling File Uploads

Learn how to upload files through an HTML form and save them somewhere on the server.

Categories
PHP

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.

Categories
PHP

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.

Categories
PHP

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.

Categories
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.

Categories
PHP

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.

Categories
PHP

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.

Categories
PHP

Passing Data with the HTML Forms

Both the GET and POST methods send data to the server, but which method should you use?

Categories
PHP

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.