The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Contact form code help
DerekD
post Sep 10 2009, 06:12 PM
Post #1





Group: Members
Posts: 4
Joined: 10-September 09
Member No.: 9,726



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 10 2009, 07:25 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,314
Joined: 9-August 06
Member No.: 6



See http://htmlhelp.com/faq/html/forms.html#form-howto and the following FAQ entry.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DerekD
post Sep 11 2009, 10:19 AM
Post #3





Group: Members
Posts: 4
Joined: 10-September 09
Member No.: 9,726



Could someone give me some exact help, lines of code, etc. I'm not a huge HTML guy and need some help with this.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 11 2009, 12:08 PM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,314
Joined: 9-August 06
Member No.: 6



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DerekD
post Sep 11 2009, 12:29 PM
Post #5





Group: Members
Posts: 4
Joined: 10-September 09
Member No.: 9,726



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 11 2009, 12:56 PM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,314
Joined: 9-August 06
Member No.: 6



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 .
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DerekD
post Sep 11 2009, 03:39 PM
Post #7





Group: Members
Posts: 4
Joined: 10-September 09
Member No.: 9,726



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 11 2009, 05:13 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,302
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 11 2009, 05:27 PM
Post #9


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,314
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th July 2019 - 01:23 AM