/    Sign up×
Community /Pin to ProfileBookmark

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 = “[email protected]“;
$mailsubj = “Form submission”;
$mailhead = “From: $emailn”;
reset ($HTTP_POST_VARS);
$mailbody =$_SERVER[‘REQUEST_URI’] . “.” .$_SERVER[‘HTTP_USER_AGENT’] . “.” . “$REMOTE_ADDR.”.”.Values submitted from web site form:n”;
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= “$key : $valn”; }
mail($mailto, $mailsubj, $mailbody, $mailhead);
</SCRIPT>

Anyone tell me whats wrong?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 23.2006 — These are the php tags:[code=php]<?php
# php goes here
?>[/code]
×

Success!

Help @baylee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...