Just looking for third set of eyes on this. I am getting this error
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 'to, from, payload, amount, route, majcom, event, type, admin) VALUES ('', 'KBLV'' at line 1
I have matched this to other examples and even used other in my site and cant find it. Im not sure if it a db erro or what, so anyone can you find the error. Thanks
mysql_query("INSERT INTO mission ( acft, to, from, payload, amount, route, majcom, event, type, admin) VALUES ('$airframeSave', '$icaoT', '$icaoF', '$payload', '$payloadA', '$route', '$majcom', '$event', '$type', '$admin') ")
or die(mysql_error());
Entire page if it helps.
<?php
//includes for session
require 'dbconnect.php';
if(isset($_POST['msn']))
{
$airframe = ($_POST['airframe']);
$user = ($_POST['username']);
$admin = ($_POST['admin']);
$icaoT = ($_POST['icaoT']);
$icaoF = ($_POST['icaoF']);
$payloadA = ($_POST['payloadA']);
$payload = ($_POST['payload']);
$route = ($_POST['route']);
$majcom = ($_POST['majcom']);
$airframeSave = ($_POST['airframeSave']);
$save = ($_POST['save']);
$type = ($_POST['type']);
$event = ($_POST['event']);
//saves mission
mysql_query("INSERT INTO mission ( acft, to, from, payload, amount, route, majcom, event, type, admin) VALUES ('$airframeSave', '$icaoT', '$icaoF', '$payload', '$payloadA', '$route', '$majcom', '$event', '$type', '$admin') ")
or die(mysql_error());
header("Location: ../Login/main.php");
;}
?>