Skip to content
CoursesWeb Forum
SectionsPHP Forms, Sessions and Basics

PHP Forms, Sessions and Basics

PHP from the start: handling GET and POST forms, sessions and cookies, includes, arrays, functions, classes and running PHP on a local server.

Threads in PHP Forms, Sessions and Basics

  1. •

    My PHP contact form sends a blank email when someone submits it

    I keep a small ordering page alive for my family's restaurant and I added a contact form to it last night. When I fill it in and press Send, the email arrives...

    3replies
  2. ✓

    How do I convert a stdClass object to an array in PHP?

    Cast it with (array) $obj to get an array of its properties. That only converts the top level, so nested objects stay objects. If the object came from...

    PHP Forms, Sessions and BasicsCallum IwuStaff answer
    1reply
  3. ✓

    How do I handle GET and POST form data safely in PHP?

    Read GET data from $GET and POST data from $POST, then treat every value as untrusted. Check that it exists, check its type and length, and escape it with...

    PHP Forms, Sessions and BasicsCallum IwuStaff answer
    1reply
CoursesWeb Forum. Questions and answers on learning web development: HTML, CSS, JavaScript, PHP, MySQL, Node.js and AI coding help.