PHP Tip, PHP & forms

When an HTML form is posted to a PHP script, PHP automatically converts periods in field names to underscores. For example, if you had form fields called “first.name” and “last.name” you would access them in PHP by using $_POST[‘first_name’] and $_POST[‘last_name’].

Attempting to use the field names with periods, e.g. $_POST[‘first.name’], will not work.

Comments are closed.