Okay, after another reading, your undeerstanding of extract is right.
But note that the author
input will generally be available as $_REQUEST["author"]
anyway. Generally avoid to extract them all.
If you for example want the value to be reused as form input you can write:
<input name="author" value="<?=htmlspecialchars($_REQUEST["author"])?>">
If you want to have shortnames, if for example it's too many fields and it spares lots of typing, then I'd recommend using the optional parameters to extract():
extract($_REQUEST, EXTR_PREFIX_ALL, "i_");
This would generate a $i_author
variable, and all other input fields with a $i_
prefix. This is believed to have less sideeffects with other (hyopthetical) local or global variables. Also you can use array_map("htmlspecialchars",$_REQUEST)
for extraction, if that aids the processing.
Multipart form data will fill up the $_FILES array additionally, which has a different structure. See PHP manual http://php.net/manual/en/features.file-upload.php