I'm new to PHP and I'm not sure of the best way to do this.
Here's what I need to do. I need a quote form (name,state, phone, email) that will use php to send an email.
The form will start with a question: "Number of people?" with text field for the user to enter a number. I will probably limit it to 10.
So, for example if the user enters 3 people and clicks submit, I would basically like to produce this code:
Code: Select all
<form name="form1" method="post" action="">
<p><hr><strong>Person 1</strong><br>
Name:
<input name="name" type="text" id="name">
<br>
<br>
State:
<input name="address" type="text" id="address">
<br>
<br>
Phone:
<input name="phone" type="text" id="phone">
<br>
<br>
Email:
<input name="email" type="text" id="email">
<hr>
</p>
<strong>Person 2</strong><br>
Name:
<input name="name2" type="text" id="name2">
<br>
<br>
State:
<input name="address2" type="text" id="address2">
<br>
<br>
Phone:
<input name="phone2" type="text" id="phone2">
<br>
<br>
Email:
<input name="email2" type="text" id="email2">
<hr>
</p>
<strong>Person 3</strong><br>
Name:
<input name="name3" type="text" id="name3">
<br>
<br>
State:
<input name="address3" type="text" id="address3">
<br>
<br>
Phone:
<input name="phone3" type="text" id="phone3">
<br>
<br>
Email:
<input name="email3" type="text" id="email3">
<hr>
</p>
<input type="submit" name="Submit" value="Submit">
<p> </p>
</form>Any ideas on the best way to handle this?
Thanks for any Help!!