I dont know if its an internal server error or my codes are wrong, but any explanation would be great.
Here is the web page: http://it-web.nhti.edu/student41/submit.html
Here is the code for the submission page:
+ Show Spoiler +
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Submit Your Stories</title>
<style type="text/css">
.auto-style1 {
text-align: center;
}
</style>
</head>
<body background="background.jpg" link="white" vlink="white">
<table bgcolor="black" border="5" width="80%" align="center">
<tr><td>
<font color="white">
<h1 class="auto-style1" align="center" id="top">Submit Your Stories</h1>
<center>
<font size="3" color="#ffffff">
<a href="default.aspx">Home Base</a> | <a href="past.html">Past Missions</a> | Submit Your Stories
</font>
</center>
<hr width="80%" size="5" color="red" noshade />
</font>
<font color="white">
<form action="send-mail.php" method="post">
Name:<br />
<input type="text" name="name" value="" maxlength="100" /><br />
Story:<br />
<textarea rows="10" cols="50" name="comments"></textarea> <br />
<input type="submit" value="Submit" />
</form>
</font>
<hr width="80%" size="5" color="red" noshade />
<center>
<font size="3" color="#ffffff">
<a href="default.aspx">Home Base</a> | <a href="past.html">Past Missions</a> | Submit Your Stories
</font>
</center>
<br />
</td></tr>
</table>
</body>
</html>
And here is the PHP code:
+ Show Spoiler +
<?php
/*
This first bit sets the email address that you want the form to be submitted to.
You will need to change this value to a valid email address that you can access.
*/
$webmaster_email = "m155g33k@gmail.com";
/*
This bit sets the URLs of the supporting pages.
If you change the names of any of the pages, you will need to change the values here.
*/
$submit = "submit.html";
$error_page = "error_message.html";
$thankyou_page = "thank_you.html";
/*
This next bit loads the form field data into variables.
If you add a form field, you will need to add it here.
*/
$name = $_REQUEST['name'] ;
$comments = $_REQUEST['comments'] ;
// If the user tries to access this script directly, redirect them to the feedback form,
if (!isset($_REQUEST['name'])) {
header( "Location: $submit" );
}
// If the form fields are empty, redirect to the error page.
elseif (empty($name) || empty($comments)) {
header( "Location: $error_page" );
}
// If email injection is detected, redirect to the error page.
elseif ( isInjected($name) ) {
header( "Location: $error_page" );
}
// If we passed all previous tests, send the email then redirect to the thank you page.
else {
mail( "$webmaster_email", "Feedback Form Results",
$comments, "From: $name" );
header( "Location: $thankyou_page" );
}
?>
Any help would be so appreciated. I just hope it's not something stupid lol
(and so help me if it is something stupid like a wrong case letter T_T)
Thanks everyone