Jump to content

Recommended Posts

Posted

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

  • 1 month later...
Posted

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 :-)

 

Email Contact Form

<?php // common.php

 

function info($msg) {

?>

 

exit;

}

?>

/* 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: [email protected]\r\n" .

"Reply-To: [email protected]\r\n"

);

 

info("Thank you, your email has been received.");

?>

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...