Code: Select all
extract($_POST);
if($email && $database)
{
}<td height="30" align="left" valign="middle"><input name="email" type="text" class="imput" /></td>
<td height="30" align="left" valign="middle"><input name="database" type="text" class="imput" /></td>
Now the two variables $email and $database do not exist anywhere in the code until the part I've highlighted. So what I think is happening is the the extract($_POST) is getting the form fields email and database and putting the values from the $_POST into the variables without a need to explicitly assign them?
From the extract function there is this example:
http://php.net/manual/en/function.extract.php
Code: Select all
$size = "large";
$var_array = array("color" => "blue",
"size" => "medium",
"shape" => "sphere");
extract($var_array, EXTR_PREFIX_SAME, "wddx");
echo "$color, $size, $shape, $wddx_size\n";Is this just a welcome to the magic of php issue that I should just accept and be grateful for?