Just having some issues with this form that will be used to send contact e-mails.
Here is my form.
HTML Code:
<div id="popupContact">
<a id="popupContactClose">x</a>
<h1>Contact an Advisor</h1>
<p id="contactArea">
<form action="http://www.chspanthers.org/studentlife/popup_files/send_mail.php" method="post" name="form 1">
<!-------------------------LINE 1 ------------------------->
Select who you want the e-mail to go to: Enter your contact e-mail:<br>
<select name="reciever" class="input">
<option>"Amanda Laister - Community Service Club"<alaister@central.k12.or.us> </option>
<option>"Jake Herbert - Film Club"<jherbert@central.k12.or.us> </option>
<option>"Adil Abounadi - International Club" <abounadi@central.k12.or.us> </option>
<option>"Amanda Laister - Spanish Club" <alaister@central.k12.or.us> </option>
<option>"Keith Omlid - Ping Pong Club" <komlid@central.k12.or.us> </option>
<option>"Patti Youngren - Ski Club" <pyoungren@central.k12.or.us> </option>
<option>"Kurt Neville - FFA" <kneville@central.k12.or.us> </option>
<option>"Rachel Duncan - GSA" <alaister@central.k12.or.us> </option>
<option>"Rachel Duncan - National Honor Society" <alaister@central.k12.or.us> </option>
<option>codedestroyer504@gmail.com</option>
</select>
<input name="sender" type="text" maxlength="50" class="input" value="superexample@domain.com" size="30">
<!--------------------NEXT LINE----------------------------->
<center><img src="../studentlife/popup_files/tile.JPG"></center>
Your Name: <input name="name" type="text" maxlength="20" class="input" value="(/._.)/ flip the table!" size="30"> | Student<input name="type" type="radio" value="student" class="input" />| Parent<input name="type" type="radio" value="parent" class="input">| Teacher<input name="type" type="radio" value="teacher" class="input">| Other<input name="type" type="radio" value="other" class="input">|
<!--------------------NEXT LINE----------------------------->
<center><img src="../studentlife/popup_files/tile.JPG"></center>
Message:<br>
<textarea name="says" cols="82" rows="7" class="input">This is where you will type your message. Please use this with care, do not spam.</textarea>
<a href="javascript: submitform()"><input name="submit" type="button" value="Send e-mail" class="button"></a>
</form>
</div>
<div id="backgroundPopup"></div>
And here's my php.
PHP Code:
<?php
$reciever = $_REQUEST['reciever'];
$name = $_REQUEST['name'];
$email = $_REQUEST['sender'];
$type = $_REQUEST['type'];
$messagetext = $_REQUEST['says'];
$subject = $name . "clubs" ;
$message = "This is an e-mail sent from the clubs and organisations page on the CHS website. The form was created by Ryan Pointer. If you have any questions, please contact him.(me)
From: {$name}
E-mail: {$email}
Type: {$type}
message: {$messagetext}";
if(mail($reciever, $subject, $message, "From:" . $email . PHP_EOL)){
echo 'Hello $name Thank you for filling out my mail form<br> An e-mail has' ;
echo 'been dispatched to the advisor and they will reply shortly to your e-mail, $email ';
echo 'Have a nice day <br>';
}else{
echo 'There has been an internal server error. Please try again later.';
}
?>
Not really sure what's wrong. Anything helps.