This code is supposed to email the person in quotes. When I upload it into PhP, MySQL gives me this error: SQL query:
< script LANGUAGE = “php” > $email = $HTTP_POST_VARS[email];
MySQL said: Documentation
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘<script LANGUAGE=”php”>
$email = $HTTP_POST_VARS[email]’ at line 1
Here is my code:
<script LANGUAGE=”php”>
$email = $HTTP_POST_VARS[email];
$mailto = “
$mailsubj = “Form submission”;
$mailhead = “From: $emailn”;
reset ($HTTP_POST_VARS);
$mailbody =$_SERVER[‘REQUEST_URI’] . “.” .$
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= “$key : $valn”; }
mail($mailto, $mailsubj, $mailbody, $mailhead);
</SCRIPT>
Anyone tell me whats wrong?