Hi,

This script keeps returning the error "Query was empty" via php's mysql_error() function. I think this is just a run-of-the-mill query, of which I have hundreds on this site. I just can't figure this out... any ideas? I'm probably missing something small. I have tested the variables and they all hold data. The script is below. User uploads a form and data about that form is inserted into the DB....

<?

//include DB connection
include "../../../include/db.inc";

//if the form has been submitted...
if (is_uploaded_file($form))
{
//First, save the file to the forms directory...
move_uploaded_file($form, "../forms/$form_name");
//Second, insert info about the form into form_list (form path, form keywords and section_id)...


//***************THIS IS THE QUERY RESULTING IN ERROR "QUERY WAS EMPTY" ****************************
$sql2 = "INSERT INTO form_list
(form_path, form_key, section_id)
VALUES ('$form_name', '$form_key', '$section_id')";
$result = mysql_query($sq12,$connection) or die (mysql_error());
//Third, grab the id of the form you just inserted
$form_id = mysql_insert_id();
**********
....



?>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to