/    Sign up×
Community /Pin to ProfileBookmark

Form Submit Help

Hey guys and gals,

I am new to this forum, but not new to forums in general. I am however a huge html noob. I tried searching for some help (always the first thing you do on any forum) but was unable to find any threads that I really understood or anything that resembled the code that I have. Basically, I am trying to replace the current form submission on my website with another. I have everything looking nice and the text fields receiving data, but when I click “submit” nothing happens.

What I need to know:
– How can I make the “Submit” button work without using the user’s mail client. I believe there is some sort of PHP involved. But, like I said…I am a noob with just enough knowledge to get myself into trouble.

Any help would be greatly appreciated. I have posted the code, as well as an example website that has that code put in.

Thanks!!

<form action=”mailto:[email protected]” method=”post”>
<!– Start Form –>
<table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”235″ align=”center”>
<tbody>
<tr>
<td height=”3″></td></tr>
<tr>
<td style=”font-family: Tahoma; color: #c70001; font-size: 8pt” align=”center”></td></tr>
<tr>
<td class=”form_text”>Full Name :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Name” type=”text” name=”Name” autocomplete=”OFF” /></td></tr>
<tr>
<td class=”form_text”>Email :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Email” type=”text” name=”Email” autocomplete=”OFF” /></td></tr>
<tr>
<td class=”form_text”>Phone :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Phone” type=”text” name=”Phone” autocomplete=”OFF” /></td></tr>
<tr>
<td class=”form_text”>Zip code moving from :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Zip From” type=”text” name=”Zip Code” autocomplete=”OFF” /></td></tr>
<tr>
<td class=”form_text”>Zip code moving to :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Zip To” type=”text” name=”Zip Code” /></td></tr>
<tr>
<td class=”form_text”>No. of bedrooms :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Number of Bedrooms” type=”text” name=”Bedrooms” /></td></tr>
<tr>
<td class=”form_text”>Move date :</td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”Move Date” type=”text” name=”Move Date” /></td></tr>
<tr>
<td class=”form_text”>How did you hear about us? </td></tr>
<tr>
<td height=”24″ valign=”top” align=”left”><input id=”How did you hear about us” type=”text” name=”Referral” /></td></tr>
<tr>
<td height=”4″ valign=”top” align=”left”></td></tr>
<tr>
<td valign=”top” align=”left”>
<table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”217″>
<tbody>
<tr>
<td height=”8″ valign=”top” align=”right”><input value=”Website Contact :: Big League Movers” type=”hidden” name=”subject” /> <input value=”[email protected]” type=”hidden” name=”recipient” /> <input value=”http://www.bigleaguemovers.com” type=”hidden” name=”redirect” /></td></tr>
<tr>
<td height=”32″ valign=”top” align=”right”><input value=”submit” type=”image” src=”images/submit.jpg” /></td></tr></tbody></table></td></tr></tbody></table><!– End Form –>
</form>

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@cbVisionJun 21.2011 — You'll need to use a server side language do handle the mailing.

Try this tutorial:

http://php.about.com/od/phpapplications/ss/form_mail.htm
Copy linkTweet thisAlerts:
@savvykmsJun 22.2011 — PHP + sendmail on a *nix system would work fine. Without using server-side technology, there is no feasible way to submit data to the server other than e-mail, which relies on the user's web browser, and by extension perhaps their OS and an e-mail client.
Copy linkTweet thisAlerts:
@Webmin_GavinJun 23.2011 — You have to create a separate php script to send it to someone such as:

[COLOR="Cyan"]<?php

$msg = "EMAIL SENT FROM YOUR BUSINESSn";

$msg .= "Sender's Name:t$_POST[sender_name]n";

$msg .= "Sender's Email:t$_
POST[sender_email]n";

$msg .= "Sender's Age:t$_POST[sender_age]n";

$msg .= "Sender's Phone:t$_
POST[sender_phone]n";

$msg .= "Sender's Street Address:t$_POST[sender_address]n";

$msg .= "Message:t$_
POST[message]n";

[COLOR="Red"]$to = "[email protected]";[/COLOR]

$subject = "What it's about";

$mailheaders = "From: My Web Site <[email protected]>n";

$mailheaders .= "Reply-To: $_POST[sender_email]n";

mail($to, $subject, $msg, $mailheaders);

?> [/COLOR]


This should be in a separate php with a name such as, [COLOR="Red"]send_form.php[/COLOR] and to have this script executed after the form is submitted the [COLOR="Red"]<form>[/COLOR] beginning should look like:

[COLOR="Red"]<form method="POST" action="send_form.php"> [/COLOR]

----Form Code Here----
×

Success!

Help @bleaufish spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...