| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Dec 2004
Posts: 13
![]() | Email Submission Form I need code.. That acts as a form.. That allows users to fill in teh desired information fields.. then when they submit the form.. It emails me with the details they filled in.. This possible??
__________________ Band Logo - http://img88.exs.cx/img88/6867/inf3cted11iv.gif Band Website - http://www.freewebs.com/inf3ctedband/ |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Oct 2003 Location: Sweden
Posts: 395
![]() ![]() | hotscripts.com ... select the language you want and search for 'email form' and you are sure to find dozens and dozens of scripts that does what you want. If you have no possibility or knowledge to install scripts on your own server there are loads of remotely hosted services that would do the job, biggest provider being bravenet.com |
| |
| | #3 (permalink) |
| Senior Member Join Date: Dec 2004 Location: Florida
Posts: 2,627
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | HTML Forms - http://www.w3schools.com/html/html_forms.asp PHP Forms - http://www.christian-web-masters.com...rm-script.html Hope it helps. |
| |
| | THREAD STARTER #4 (permalink) |
| New Member Join Date: Dec 2004
Posts: 13
![]() | Thank you guys.. Really Appreciate it..
__________________ Band Logo - http://img88.exs.cx/img88/6867/inf3cted11iv.gif Band Website - http://www.freewebs.com/inf3ctedband/ |
| |
| | THREAD STARTER #6 (permalink) |
| New Member Join Date: Dec 2004
Posts: 13
![]() | Im still having trouble making it so the submit button.. emails me the details..
__________________ Band Logo - http://img88.exs.cx/img88/6867/inf3cted11iv.gif Band Website - http://www.freewebs.com/inf3ctedband/ |
| |
| | #7 (permalink) |
| Account Suspended Join Date: Oct 2004 Location: Manchester, UK
Posts: 623
![]() | Save this as feedback.php : Code: <?
/*
CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.01.
$Id: phpscript.txt 1.1 2003/04/17 11:53:45 chris Exp $
*/
// ------------- CONFIGURABLE SECTION ------------------------
$mailto = 'your@address.com' ;
$subject = "THE SUBJECT YOU WANT IN YOUR EMAIL" ;
$formurl = "http://yourURL.com/contact.php" ;
$errorurl = "http://YourURL.com/error.php" ;
$thankyouurl = "http://YourURL.com/thankyou.php" ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;
?> Code: <form action="feedback.php" method="post">
<table width="209" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="88">Name:</td>
<td width="121"><input type="text" name="name" size="34" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email" size="34" /></td>
</tr>
<tr>
<td>comments:</td>
<td><textarea cols="36" name="comments"></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" value="Send" />
</div></td>
</tr>
</table>
</form> |
| |
| | #8 (permalink) |
| First Time Poster! Join Date: Jan 2005
Posts: 1
![]() | sorry to bring this back up, but this was nearly exactly what i wanted. could you just explain to me how i would go about having the subject of the email that is sent to me selected by a dropdown box. For example, if you look at my slightly modified email submission form: http://www.ifmicecouldmovemountains.com/contact.php you can see i've put in a drop down box. How can i make whatever the user chooses the subject of the email sent to me, or better still is it possible to have the form sent to different emails depending on the item chosen from the list? Lastly, how can you set a limit on the number of words that can be typed horizontally in the comments box. Thanks in advance. |
| |