PDA

View Full Version : Info examples for building a form


mewzik
07-18-2004, 01:16 AM
Hi,

I'd like to put a fill-in form on my site.
Could someone show me a good tutorial or example which i can use so I can dig in this subject and make me a good form where the answers will arrive in my mailbox orso ?
Dunno exactly how this work, that's why I hope some of you might know.

Thanks in advance


Mewzik

Sk8er9547
07-18-2004, 04:02 AM
If you search on google, you can find many things...

http://www.microcyb.com/?m=c&c=43

or you can go to hotscripts.com and look through their many tutorials of php. Here is a direct link to their form processing page in PHP.

http://www.hotscripts.com/PHP/Tips_and_Tutorials/Form_Processing/index.html

Good luck!

mewzik
07-18-2004, 12:28 PM
Well I was hoping that I could just use this example form. Adjust it and make some changes that it saves the filled in data on my site or sents to my mail.
Or is that too simplistic ? Because now when I click the submit button, nothing happens.

here's the form :


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
</script>
</head>

<body onload="dynAnimation()">

<table style="BORDER-COLLAPSE: collapse" borderColor="#111111" height="109" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%" bgColor="#0000ff" height="81">
<p align="center"><b> </b>
</td>
</tr>
<tr>
<b>
<td width="100%" bgColor="#808080" height="27">
<p align="center"><b> </b>
</td>
</b>
</tr>
</table>
<table style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-COLLAPSE: collapse; BORDER-RIGHT-WIDTH: 0px" borderColor="#111111" cellSpacing="0" cellPadding="0" width="100%" border="1">
<tr>
<td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" width="82%">
&nbsp;
<table style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td style="BORDER-BOTTOM: medium none" width="2%">
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="104%">
<tr>
<td width="1%">&nbsp;</td>
<td width="99%"><b>
<p class="text" align="center"><u></u></p>
<p class="text"><font face="Verdana" size="2"><br>
<br>
</font></p>
<table class="text" style="BORDER-COLLAPSE: collapse" borderColor="#111111" height="1" cellSpacing="0" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
<tr>
<td class="text" colSpan="2" height="16">
<font face="Verdana" size="1">1. <b>Please supply us with your
contact information:</b></font></td>
</tr>
<tr>
<td class="text" width="25%" height="22">
<p align="right"><font face="Verdana" size="1">Name:&nbsp;</font></td>
<td width="75%" height="22"><font face="Verdana" size="1">
<input name="text1" size="20"></font></td>
</tr>
<tr>
<td class="text" width="25%" height="22">
<p align="right"><font face="Verdana" size="1">Organization:&nbsp;</font></td>
<td width="75%" height="22"><font face="Verdana" size="1">
<input name="text2" size="20"></font></td>
</tr>
<tr>
<td class="text" width="25%" height="22">
<p align="right"><font face="Verdana" size="1">Address:&nbsp;</font></td>
<td width="75%" height="22"><font face="Verdana" size="1">
<input name="text3" size="20"></font></td>
</tr>
<tr>
<td class="text" width="25%" height="22">
<p align="right"><font face="Verdana" size="1">City and State:&nbsp;</font></td>
<td class="text" width="75%" height="22">
<font face="Verdana" size="1"><input name="text4" size="20"> &nbsp;ZIP
Code:&nbsp; <input size="8" name="text5"></font></td>
</tr>
<tr>
<td class="text" width="25%" height="22">
<p align="right"><font face="Verdana" size="1">E-mail:&nbsp;</font></td>
<td width="75%" height="22"><font face="Verdana" size="1">
<input name="text6" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">2. <b>Do you currently use any
&quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Yes<br>
<input type="radio" value="radiobutton" name="radiobutton"> No<br>
<input type="radio" value="2c" name="radiobutton"> Don't know</font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="31">
<font face="Verdana" size="1">3. <b>What brand of &quot;PRODUCT&quot; are you
currently using?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Brand 1<br>
<input type="radio" value="radiobutton" name="radiobutton"> Brand 2<br>
<input type="radio" value="radiobutton" name="radiobutton"> Brand 3<br>
<input type="radio" value="radiobutton" name="radiobutton"> Brand 4<br>
<input type="radio" value="radiobutton" name="radiobutton"> Brand 5<br>
<input type="radio" value="radiobutton" name="radiobutton"> Other</font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="55">
<font face="Verdana" size="1">4. <b>How did you purchase this
&quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Retail
Store<br>
<input type="radio" value="radiobutton" name="radiobutton"> Direct
Mail<br>
<input type="radio" value="radiobutton" name="radiobutton"> Catalog<br>
<input type="radio" value="radiobutton" name="radiobutton"> Web<br>
<input type="radio" value="radiobutton" name="radiobutton"> Company<br>
<input type="radio" value="radiobutton" name="radiobutton"> Other</font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">5. <b>Are there features that this
product does not have that you would expect out of a &quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Yes<br>
<input type="radio" value="radiobutton" name="radiobutton"> No<br>
<input type="radio" value="radiobutton" name="radiobutton"> Don't
know</font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="2">
<font face="Verdana" size="1">6. <b>What features does the &quot;PRODUCT&quot;
not have that you wish it did?</b><br>
<textarea name="textfield" rows="3" wrap="VIRTUAL" cols="45"></textarea></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">7. <b>How much did the &quot;PRODUCT&quot; cost?</b><br>
<input name="textfield2" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">8. <b>How satisfied are you with the
&quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Very
Satisfied<br>
<input type="radio" value="radiobutton" name="radiobutton"> Somewhat
Satisfied<br>
<input type="radio" value="radiobutton" name="radiobutton"> Somewhat
Dissatisfied<br>
<input type="radio" value="radiobutton" name="radiobutton"> Very
Dissatisfied</font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="60">
<font face="Verdana" size="1">9. <b>Of the following list of
features, please select the top three that would be of interest to
you:</b><br>
<input type="checkbox" value="checkbox" name="checkbox"> Feature 1<br>
<input type="checkbox" value="checkbox" name="checkbox2"> Feature 2<br>
<input type="checkbox" value="checkbox" name="checkbox22"> Feature 3<br>
<input type="checkbox" value="checkbox" name="checkbox23"> Feature 4<br>
<input type="checkbox" value="checkbox" name="checkbox24"> Feature 5<br>
<input type="checkbox" value="checkbox" name="checkbox25"> Feature 6</font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="4">
<font face="Verdana" size="1">10. <b>Of the three features you just
listed, please rank them first, second and third in importance to
you:</b><br>
1. <input name="textfield3" size="20"><br>
2. <input name="textfield4" size="20"><br>
3. <input name="textfield5" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="70">
<font face="Verdana" size="1">11. <b>Are there any additional
features that would be of importance to you?</b><br>
Additional Feature 1 <input size="45" name="textfield6"><br>
Additional Feature 2 <input size="45" name="textfield7"><br>
Additional Feature 3 <input size="45" name="textfield8"><br>
Additional Feature 4 <input size="45" name="textfield9"><br>
Additional Feature 5 <input size="45" name="textfield10"></font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="77">
<font face="Verdana" size="1">12. <b>Are there particular features
that a product must have for you to purchase it? Please list what
they are in order of importance:</b><br>
Essential Feature 1 <input size="45" name="textfield11"><br>
Essential Feature 2 <input size="45" name="textfield12"><br>
Essential Feature 3 <input size="45" name="textfield13"><br>
Essential Feature 4 <input size="45" name="textfield14"><br>
Essential Feature 5 <input size="45" name="textfield15"></font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">13. <b>How much would you be willing
to pay for a product with these features (&quot;LIST FEATURES&quot;)?</b><br>
<input name="textfield16" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="20">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="12">
<font face="Verdana" size="1">14. <b>If the &quot;PRODUCT&quot; was priced at
(price) how likely, on a percentage basis, would you be to buy it?</b><br>
<i>(0% = Not at all likely to buy, 100% = Completely likely to buy)</i><br>
<input name="textfield17" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">15. <b>How much are you authorized to
spend on new products?</b><br>
<input name="textfield18" size="20"></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="70">
<font face="Verdana" size="1">16. <b>What do you think about the
price of this &quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton">
Extremely Low<br>
<input type="radio" value="radiobutton" name="radiobutton"> Somewhat
Low<br>
<input type="radio" value="radiobutton" name="radiobutton"> Just
right<br>
<input type="radio" value="radiobutton" name="radiobutton"> Somewhat
High<br>
<input type="radio" value="radiobutton" name="radiobutton">
Extremely High</font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="41">
<font face="Verdana" size="1">17. <b>Through what means would you be
most likely to purchase this &quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Retail<br>
<input type="radio" value="radiobutton" name="radiobutton"> Direct
Mail<br>
<input type="radio" value="radiobutton" name="radiobutton"> Mail
Order Catalog<br>
<input type="radio" value="radiobutton" name="radiobutton">
Classified Advertisement<br>
<input type="radio" value="radiobutton" name="radiobutton">
Telemarketer</font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">18. <b>Through what means would you be
least likely to purchase this &quot;PRODUCT&quot;?</b><br>
<input type="radio" value="radiobutton" name="radiobutton"> Retail<br>
<input type="radio" value="radiobutton" name="radiobutton"> Direct
Mail<br>
<input type="radio" value="radiobutton" name="radiobutton"> Mail
Order Catalog<br>
<input type="radio" value="radiobutton" name="radiobutton">
Classified Advertisement<br>
<input type="radio" value="radiobutton" name="radiobutton">
Telemarketer</font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="17">
<font face="Verdana" size="1">19. <b>What do you think would be a
good name for such a &quot;PRODUCT&quot;?</b><br>
<textarea name="textarea" rows="3" wrap="VIRTUAL" cols="45"></textarea></font></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td class="text" colSpan="2" height="1">
<font face="Verdana" size="1">20. <b>Can you please tell us which
one of the following possible product names you would like the most?</b><br>
<input type="radio" value="radiobutton" name="radiobutton">
Product
1<br>
<input type="radio" value="radiobutton" name="radiobutton"> Product
2<br>
<input type="radio" value="radiobutton" name="radiobutton"> Product
3<br>
<input type="radio" value="radiobutton" name="radiobutton"> Product
4<br>
<input type="radio" value="radiobutton" name="radiobutton"> Product
5</font></td>
</tr>
<tr>
<td colSpan="2" height="50">&nbsp;</td>
</tr>
<tr>
<td class="sample" colSpan="2" height="1"><b>
<font face="Verdana" size="1">Thank you for taking the time to
complete this survey. Select Submit Survey now to send your
responses to us.</font></b></td>
</tr>
<tr>
<td colSpan="2" height="1">&nbsp;</td>
</tr>
<tr>
<td width="25%" height="1">
<dl>
<dd align="right"><font face="Verdana" size="2">&nbsp;&nbsp; </font>
<font face="Verdana"><b>
<input type="submit" value="Submit" name="Submit"></b></font> </dd>
</dl>
</td>
<td width="75%" height="1"><font face="Verdana" size="2">&nbsp;</font><b><font face="Verdana"><input type="submit" value="Reset" name="Reset"><br>
&nbsp;</font></b></td>
</tr>
</table>
</b>
<p>&nbsp;</td>
<td width="1%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" width="1%">&nbsp;
</td>
</tr>
</table>
<p align="center"><b><font face="Verdana" color="#000000" size="1"> <a language="Javascript1.2" onmouseover="rollIn(this)" style="TEXT-DECORATION: none" onmouseout="rollOut(this)" fprolloverstyle="text-decoration: underline; font-family: Verdana; font-size: 8pt; font-weight: bold" dynamicanimation="fpAnimformatRolloverFP1" href="conditions.htm">
</a></font></b></p>

</body>

</html>

Sk8er9547
07-18-2004, 08:41 PM
You can easily set it up to put the information in a database or be sent to your e-mail. The basic part of sending it to your e-mail is the mail() function, here is a link to some information on that.

http://www.thescripts.com/serversidescripting/php/tutorials/parsingformswithphpandsendinge-mail/page0.html

That page is pretty straightforward on php's mail() function.

mewzik
07-19-2004, 08:11 PM
Thanks, Sk8er9547

Looks good to me. I only need to dig in a lil bit more. Just viewed it quickly.