Help - Search - Members - Calendar
Full Version: Contact form code help
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
DerekD
Here's the link to the page:
http://mindtoygames.com/contact.html

You can see I have an existing form there that came with the site, with this code creating it, I believe:
CODE
<form style="padding:0;margin:0 ">  <table border="0" cellspacing="0" cellpadding="0" class="txt5" style="margin-left:10px ">

  <tr>
    <td valign="top" width="67" style="padding-top:4px "><b>Name</b> </td>
    <td valign="top"  style="padding-bottom:15px "><input name="Name" type="text" class="txt5" id="Name" style="width:148px;height:15px;border:1px solid #3BA7D6 "></td>
  </tr>
   <tr>
    <td valign="top" width="67" style="padding-top:4px "><b>Email</b> </td>
    <td valign="top"  style="padding-bottom:15px "><input name="Email" type="text" class="txt5" id="Email" style="width:148px;height:15px;border:1px solid #3BA7D6 "></td>

  </tr>
   <tr>
    <td valign="top" width="67" style="padding-top:4px "><b>Comments</b> </td>
    <td valign="top"  style="padding-bottom:5px "><textarea name="Message" class="txt5" id="Message" style="width:148px;height:36px;border:1px solid #3BA7D6;overflow:auto "></textarea></td>
  </tr>
  <tr>
    <td valign="top" colspan="2" align="right" style="padding-right:10px "><a href="#" style="color:#F26522;font-size:12px"><b>Submit</b></a></td>

  </tr>
</table>
</form>


How do I set this up to accept any input in the boxes and e-mail it to me when the person clicks Submit? (Turn it into a contact form, essentially). Please help with how I modify this code, and PHP file code I may need.

Thanks!
Derek
pandy
See http://htmlhelp.com/faq/html/forms.html#form-howto and the following FAQ entry.
DerekD
Could someone give me some exact help, lines of code, etc. I'm not a huge HTML guy and need some help with this.
pandy
It isn't the HTML that is the big issue. It's the script on the server that the action attribute should point to.

You can find ready-made scripts at for example http://hotscripts.com, but you must know what language you want it in. Are languages like PHP or Perl available to you?
DerekD
My server supports PHP and Perl. I know that a separate "processing php file" would be needed to email me the input in the fields. How do I "connect" it to the existing form?

If someone could give me the lines of code needed that would work in the code I gave above, i'd appreciate it.
pandy
With the action attribute. You have an example at the top of the FAQ I linked to.

Also see http://htmlhelp.com/reference/html40/forms/form.html .
DerekD
I need just the lines themselves...not looking to figure it out. I'm even willing to pay a few dollars for some help with this from someone.
Darin McGrew
Perhaps one of these CGI or PHP form-processing programs will meet your needs:
http://cgi.resourceindex.com/Programs_and_...orm_Processing/
http://php.resourceindex.com/Complete_Scri...orm_Processing/
pandy
QUOTE(DerekD @ Sep 11 2009, 10:39 PM) *

I need just the lines themselves...not looking to figure it out. I'm even willing to pay a few dollars for some help with this from someone.


How are you going to be able to do this if you don't figure it out? There is no copy-paste code that fits all situations.

You have a FORM tag, right? That form tag should, among other things have an action attribute. The value if that attribute should be the URL to the script that handles the form.

<form action="URL/TO/SCRIPT.PHP"...>

What exactly that URL is only you can know.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.