Ok guys I had a feedback form working until now, now it doesn't seem to send e-mail, it used to and I haven't changed it, either that or it's taking extremely long, it's been like 40 minutes now, is the below code right?
<?php
// Form Mail Script Vers. 1.0
// The below statement checks if the submit button has been clicked and if not displays the form
if (!isset($submit)) {
// Insert your html form below, making sure to leave out the "s in your html or it will close the echo()
// function that displays the form prematurely.
// Example: <img src="foobar.gif"> should be <img src=foobar.gif>
echo("
<html>
<head>
<title>Comments Script - Powered by Marks Form Mail Vers. 1.0</title>
<style type=text/css>
<!--
@import url(style.css);
-->
</style>
</head>
<body>
<center>
<table width=95% border=0 cellpadding=0 cellspacing=0>
<tr><td>
<form method=post>
<input class=textbox type=text name=name size=53><br><br>
<input class=textbox type=text name=email size=53><br><br>
<textarea class=textarea name=message rows=12 cols=64></textarea><br><br>
<input class=textarea type=submit value=Send name=submit> <input class=button type=reset value=Clear>
</form>
</td></tr>
</table>
</center>
</body>
</html>
");
}
// The below statement checks if the submit button has been clicked and if it has it says thanks.
else if ($submit == true) {
// The following mail() function is the handler to send off the user input to your e-mail address.
mail( "mwood_2k2@msn.com", "Feedback from $name", $message, "From: $email" );
// The first set of quotes contains the e-mail address that you wish to recieve the user input at.
// The second set of quotes contans the text you wish to be displayed in the subject of the recieved mail.
// $name displays the senders name from the form submissal.
// $message obviously displays the message content the user submitted.
// The final set of quotes displayes the submitters e-mail address in the from: field in the e-mail.
// The below html is the code responsible for the thank you page that this file generates once the form
// has been submitted. Of course you can change this, but if you wish to keep the thank you message
// peronalised make sure to include the variable $name somewhere;
// Example; Thank you $name for your comments etc
// As before remember to leave out the "s as it will prematurely end the echo() function if you use them.
echo("
<html>
<head>
<title></title>
<style type=text/css>
<!--
@import url(style.css);
-->
</style>
</head>
<body>
<center>
<table width=95% border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<div align=center>
:: Thank you $name for your comments! They will be looked at as soon as they are recieved! ::
</div>
</td>
</tr>
</table>
</center>
</body>
</html>
");
}
// Final Comments:
// At some point I will add information on how to edit the number of fields for people who wish to gather
// further information, this is something I haven't tested yet and as I am a begginner in php and I still
// have a lot to learn! Happy Forming!
?>
It's driving me nuts! I need this working again! Please help!
Cheers