MSSQL error: The name "XXX" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Code: Select all
$sql = 'INSERT INTO tbl_jobs VALUES (';
$sql .= $_POST["company"];
$sql .= ',';
$sql .= $_POST["location"];
$sql .= ',';
$sql .= $_POST["title"];
$sql .= ',';
$sql .= $_POST["desc"];
$sql .= ',';
$sql .= $_POST["exper"];
$sql .= ',';
$sql .= $_POST["edu"];
$sql .= ',';
$sql .= $_POST["link"];
$sql .= ')';In my troubleshooting, I verified that the variables are passing correctly, but it's treating it like a column name (according to the error). According to what I have seen, the syntax looks ok, but again, I am confused. I have googled this, but no luck so far.