dimanche 1 mars 2015

How to capture data from multiple form search fields in one variable

I have an html search form with multiple fields like select, textarea and text inputs. I need the values from all the fields to be stored into $input in the php search form but I'm not sure how to store them into one variable called $input on the php page.



<form name="search" method="post" action="http://ift.tt/1Asootw">
Seach for: <input type="text" name="find" /> <input type="submit"
name="search" value="Search" />
Search for movies by Type
<select name="find">
<option value="Sci-Fi" selected>Sci-Fi</option>
<option value="Comedy">Comedy</option>
<option value="Drama">Drama</option>
</select>
</form>

//on search.php need to 'find' to be data from several form inputs
$input = $_POST['find'];

Aucun commentaire:

Enregistrer un commentaire