hi, I have a mailform that e-mails me the info they fill out in a form but I want the info to be added in my database also but when I add the code to the mailform so that it will I get this error
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/planetzi/public_html/leveling/mailform.php on line 26
the mailform looks like this
[php]
Mailform <?php$to = “[email protected]”;
$subject = $_POST[“subject”] ;
$message = “MSN: {$_POST[‘msn’]}nnn{$_POST[‘message’]}nnLeveler: {$_POST[‘leveler’]}nVocation: {$_POST[‘select1’]}nCurrent Level: {$_POST[‘select2’]}nDesired Level: {$_POST[‘select3’]}nWorld type: {$_POST[‘select4’]}nAccount Status: {$_POST[‘select5’]}nSkills: {$_POST[‘select6’]}nMagic level: {$_POST[‘select7’]}nEquipment: {$_POST[‘select8’]}”;
$from = “Leveling Order”;
$headers = “From: $from”;
mail($to,$subject,$message,$headers);
$con = mysql_connect(“localhost”,“xxxxxxxxxxx”,“xxxxxxxxxxxx”);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
mysql_select_db(“xxxxxxx”, $con);
$sql=“INSERT INTO orders (login, vocation, current level, desired level, world type, prem, skills, mag, eq, msn, leveler, Order status)
VALUES
(’$_POST[login]’,’$_POST[select1]’,’$_POST[select2]’,’$_POST[select3]’,’$_POST[select4]’,’$_POST[select5]’,’$_POST[select6]’,’$_POST[select7]’,’$_POST[select8]’,’$_POST[msn]’,’$_POST[leveler]’,’$_POST[order status]’)”;
if (!mysql_query($sql,$con))
{
die('Error: ’ . mysql_error());
}
echo “Thank you for using my mail form //Gatsu”;
mysql_close($con)
?>
[/php]might you know what I am doing wrong?
please teach me!