Web Development Thread, Email Form in Coding and Web Development; I have been requested of the teacher incharge of the student council to set a little webpage so students in ...
-
29th September 2009, 02:05 PM #1 Email Form
I have been requested of the teacher incharge of the student council to set a little webpage so students in school and submit something on this form to put a suggestion.
This will go to a email address in school and want it to look something like:
Name:___________________
Comment:__________________
__________________________
__________________________
Submit.
But i am unsure how to set it. tried searching google with no preveil.
Thanks
Peter
-
-
IDG Tech News
-
29th September 2009, 02:13 PM #2 Have a look at Google Docs - it can do all of this for you with ease.
-
-
17th November 2009, 05:25 PM #3
- Rep Power
- 0
Are you using IIS or Apache as your host and do you have any scripting (e.g. PHP) available to you? Is this a server you control?
-
-
17th November 2009, 06:31 PM #4 If you have a server running .php you could do something like this:
Contact PHP Email Form Script with free contact php code
I must admit I've not tried it, it was just the first thing that appeared in a google search. For an easy life I would probably go with webmans solution.
-
-
17th November 2009, 06:53 PM #5
- Rep Power
- 0
I would second using Google forms, part of the Google Docs spreadsheet. We use them in the school I work for inset surveys and other data collection.
There's also more of a chance that others might pick up on how to use them.
If you decide to dive into php and hosting your own script there's one below I use for the sixth form students making websites in my school as a generic email form. for this to work the html form pointing to it must have a hidden filed called EmailAddress with the value being the recipient's email address.
Save the headache and do the Google thing though :-)
<html>
<head>
<title>Email Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php // common.php
function info($msg) {
?>
<script language="JavaScript">
<!--
alert("<?=$msg?>");
history.back();
//-->
</script>
<?
exit;
}
?>
</head>
<body>
<?
/* get date */
$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
/* recipients */
$to = $_POST['EmailAddress'];
/* subject */
$subject = "Email Contact Form";
/* message */
$message = "
$today
Senders details -
";
/* message continued - get details from form */
foreach ($_POST as $key => $value) {
if ($key != "email" && $key != "submit") {
$message .= $key ." : ". $value . "\n";
}
}
/* and now mail it */
mail($to, $subject, $message,
"From: form2email@yourdomain.com\r\n" .
"Reply-To: form2email@yourdomain.com\r\n"
);
info("Thank you, your email has been received.");
?>
</body>
</html>
-
SHARE: 
Similar Threads
-
By -Jim in forum Windows Server 2000/2003
Replies: 5
Last Post: 31st March 2009, 10:04 PM
-
By cjohnsonuk in forum Windows Server 2008
Replies: 8
Last Post: 26th September 2008, 08:58 PM
-
By Anti in forum Web Development
Replies: 8
Last Post: 14th August 2007, 11:15 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules