Jump to content

syntax error


jeff5656

Recommended Posts

I cannot for the life of me see where in the code the error is.  I get 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 'show, comments, signoff_status) VALUES('','pt name', '12345', '03/19/08', 'yo' at line 1

 

<?php
include ("connectdb.php");

// grab the variables from the form

$patient_name = $_POST['patient_name'];
$mrn = $_POST['mrn'];
$rcf_date = $_POST['rcf_date'];
$your_name = $_POST['your_name'];
$dx = $_POST['dx'];
$show = $_POST['show'];
$comments = $_POST['comments'];


// insert the data into the database

$query = "INSERT INTO xrayconf (id_incr, patient_name, mrn, rcf_date, your_name, dx, show, comments, signoff_status)

VALUES('$id_incr', '$patient_name', '$mrn', '$rcf_date', '$your_name', '$dx', '$show', '$comments', 'a')";

mysql_query($query) or die(mysql_error());

echo "Thanks for submitting!";
?>
<table width="90%"><tr><td width="179" align="center"><a href="test.com">test.COM</a></td>

</tr></table>

 

Link to comment
https://forums.phpfreaks.com/topic/96948-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.