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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coding a form

Status
Not open for further replies.

naiku

Technical User
Apr 25, 2002
346
US
Hey

I am attempting to code a basic form to put on my website, the information I am trying to get is Name, Address, Email address and a couple of radio button options.

Can anyone give me any pointers on how to go about putting it together? or point me to some sites with examples where I can view source. Can anyone also recommend a script for processing the form so that it's information is emailed to me.

I have a copy of Dreamweaver MX but would prefer to code the HTML using notepad. Thanks in advance

Naiku
 
easy really...

<form name=&quot;YourFormName&quot; action=&quot;PlaceToSendTo.cgi&quot; method=&quot;post&quot;>
name:<input type=text name=&quot;userName&quot;><br>
Email:<input type=text name=&quot;Email&quot;><br>
Address:<textarea name=&quot;address&quot; cols=30 rows=10></textarea>
<input type=radio name=&quot;radio1&quot;>Radio 1 &nbsp;<input type=radio name=&quot;radio2&quot;>Radio 2<br>
<input type=Submit value=&quot;submit&quot;>
</form>

you can send the contents of the by email, however this is not the securist of ways to do it.

the easist way for you to deal with form data is to get someone else to email to you, you just put thier url in the form action. They will process the form and then email it to you. You can find companies that offer these services on the web, alternatively look through the threads on this forum regarding emailing forms for more info
 
Can I put the form into a table? I want to have the Title, Name and Surname all on the same line, then below that the email and so on.

 
Is there a simple way of getting this information from the user without them e-mailing it to you?
 
I don't think there is anyway to get the information without using a form. I work for an air conditioning company and the form is there so that potential customers can send us information about if they want new air conditioning installed, or if they want maintenance for old equipment. Therefore I need to get name, telephone number and a few other details.

It's simply so that visitors to the site can request someone from the company contact them with regards to their query.
 
here's the answer to your table ?
<form name=&quot;YourFormName&quot; action=&quot;PlaceToSendTo.cgi&quot; method=&quot;post&quot;>
<table>
<tr><td>
name:
</td>
<td>
<input type=text name=&quot;userName&quot;><br>
</td>
</tr>
<td>
Email:
</td>
<td>
<input type=text name=&quot;Email&quot;><br>
</td>
</tr>
<td>
Address:
</td>
<td>
<textarea name=&quot;address&quot; cols=30 rows=10></textarea>
</td>
</tr>
<tr>
<td>
<input type=radio name=&quot;radio1&quot;>Radio 1 <input type=radio name=&quot;radio2&quot;>Radio 2<br>
</td>
<tr>
<tr><td>
<input type=Submit value=&quot;submit&quot;>
</td></tr>

</form> [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Using forms is the only way you are going to get this data from the user.

I have yet to see a hosting service that does not provide a form of mailto script for use with email forms though.

usually in some kind of link as cgi library or just cgi within the services site.

[bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Yeah I have the formmail script, just gotta sort out the layout of the form now. And then hope that it all works!!

Thanks for the replies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top