Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php form question for newbie

Status
Not open for further replies.

bubba10

Technical User
Jan 20, 2005
2
US
Hi have a previously created form that was used on our website and now I want to modify it.

Basically I want people to enter fields containing Name, Address, City, State, and Zip.
Then if they want to add more names, I want them to be able to click "Add more friends", then those same fields will be added again. And so on and so on.

I could create these fields many times and just do it like that but the users will be able to enter an infinite number of names - so I would like it to just have the fields once, and then the ability to add more if needed.

I hope this is making sense. I can post my code if that helps. Also, the form will be sent to an email address, not entered into a database. So I guess I need to figure out how it will print each field in the email, etc.

Thanks for any help and insight
 
Could you post your code? As for the email posting, I have that working on my webpage, under "Contact" and "Tell a Friend," which I might be able to share with you.

But with the adding new fields, it would help to see your code so everyone can see what they need to work with.

Hope this helps.

Nick Ruiz
Webmaster, DBA
 
The following is the part of the form that I would like to be able to have the user click "add more names" and then the same fields would appear again after the first set - rather than me making the same fields over and over again and cluttering the page. Let me know what you think or if you need more info.

<tr>
<td><strong>My friend(s) would also like to participate </strong></td>
</tr>
<tr>
<td>XYZ Corporation please send Fun Raiser information to the name(s) listed below </td>
</tr>
<tr>
<td>Name: &nbsp;
<input type="text" name="friendname1" size="52"></td>
</tr>
<tr>
<td>Address: &nbsp;
<input type="text" name="friendaddress1" size="49"></td>
</tr>
<tr>
<td> City: &nbsp;
<input type="text" name="friendcity1" size="19">
&nbsp; State:
<input type="text" name="friendstate1" size="2">
&nbsp; Zip:
<input type="text" name="friendzip1" size="10">
</td>
</tr>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top