Im trying to see if my submit will work but its not working. when i hit submite its suppose to print out all the information entered (just to see if its capturing all the required data). But its not doing anything, can someone help me out thank you here there the two sets of code.
<?php
include("include/connect.inc.php");
?>
<HTML>
<head><title>Feedback Page</title></head>
<body>
<?php include("include/submit.inc.php"); ?>
<form method="POST">
<table>
<tr><td>Name: </td><td><input type="text" name="name" value="" /></td></tr>
<tr><td>Phone: </td><td><input type="text" name="phone" value="" /></td></tr>
<tr><td>Email: </td><td><input type="text" name="email" value="" /></td></tr>
<tr><td valign="top">Affiliation: </td><td>
<input type="checkbox" name="affiliation[]" value="prospective student">Prospective Student</br>
<input type="checkbox" name="affiliation[]" value="current student">Current Student</br>
<input type="checkbox" name="affiliation[]" value="faculty or staff">Faculty or staff</br>
<input type="checkbox" name="affiliation[]" value="parent">Parent</br>
<input type="checkbox" name="affiliation[]" value="alum">Alum</br>
<input type="checkbox" name="affiliation[]" value="vendor">Vendor</br>
<input type="checkbox" name="affiliation[]" value="other">Other
<input type="text" name="otherbox" value="" /></br>
</td></tr>
</table>
<table>
<tr><td bgcolor="#FF9933" colspan="2">Department to be contacted:</td></tr>
<?php include("include/listdepartments.inc.php"); ?>
</table>
<table>
<tr>
<td bgcolor="#F88000">Your comment:</td>
</tr>
<tr>
<td><textarea name="comment" cols="60" rows="10" value=""></textarea></td>
</tr>
<tr>
<td><input type="submit" value="Submit">
<input type="button" value="reset"></td>
</tr>
</table>
</form>
</body>
</HTLM>
Here that submit.inc.php file thats being included.
<?php
if($_POST["submit"])
{
$name = $_POST["name"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$affiliation = $HTTP_POST_VARS["affiliation"];
$department = $_POST["department"];
$comment = $_POST["comment"];
echo $name;
echo "<br>";
echo $phone;
echo "<br>";
echo $email;
echo "<br>";
echo $affiliation;
echo "<br>";
echo $department;
echo "<br>";
echo $comment;
}
?>