bberry91
14 Mar 2011, 08:03 AM
I have a php form, and have about 15 fields. Right now, I am submitting the fields to the form_send.php as:
$name = $_POST['name'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$phone1 = $_POST['phone1'];
$phone2 = $_POST['phone2'];
$phone3 = $_POST['phone3'];
$business = $_POST['business'];
What would be a quicker, more efficient way? Would I use arrays, or something of the sort? Or can I get each field, and set it to the form field name, so I only need one line of code?
Thanks.
$name = $_POST['name'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$phone1 = $_POST['phone1'];
$phone2 = $_POST['phone2'];
$phone3 = $_POST['phone3'];
$business = $_POST['business'];
What would be a quicker, more efficient way? Would I use arrays, or something of the sort? Or can I get each field, and set it to the form field name, so I only need one line of code?
Thanks.