PHP variable not getting passed from an HTML form
This is a pretty common issue and can be resolved quite easily.
If a textfield in your html form is called “name” the same should be available in your PHP script as $name. If the value is not getting transfered from the HTML form then instead try to use $_REQUEST[’name’].
$_REQUEST is an assosiative array that contains all variables received by a script in GET or POST method. A security setting in PHP ini file can prevent the html form fields to become unavailable in the php script. The fix is to access the same variable from the $_REQUEST array.
An alternate way is to run the following code at the start of your php script which will recreate $name from the $_REQUEST array for you automatically.
<?php
foreach ($_REQUEST as $key = > $value)
{
$$key = $value; // create $name from $_REQUEST[’name’] and all other such variables.
}
?>