MySQL Forums
Forum List  »  MySQL Administrator

SQL syntax error
Posted by: Biju PV
Date: December 15, 2010 12:38AM

Hello, i am new to this world, can anyone help me on this. I ma trying to submit a php based form to the DB (Mysql5.0), my prosessor.php file look like below.

what am I doing wrong here?




("","test - Form submission","$query = INSERT INTO form ('First Name','
Middle Name',
'Last Name',

Student ID Number','
Course Enrolled In',
'Date Of Birth','
Place Of Birth',
'Present Address',
'Permanent Address','Email Address',
'Mobile Number','
Home Phone

Can the University reach you via SMS?','
'Parent Name (Father)','
Parent Name (Mother)','
Family Name','
Present Address','
Phone Number',
'Email Address','
Emergency Contact Name','
'Mobile Number') VALUES



powered by test.


= mysql_connect('localhost', 'root', 'global123')
or die('Could not connect: ' . mysql_error());

mysql_select_db('pds') or die('Could not select


// Performing SQL query
$query = "insert into table1('column1','column2') values('value1','value2')";
$result = mysql_query($query) or die('Query

failed: ' . mysql_error());

include ("confirm.html");


Edited 1 time(s). Last edit at 12/15/2010 12:39AM by Biju PV.

Options: ReplyQuote

Written By
SQL syntax error
December 15, 2010 12:38AM
February 02, 2011 10:36AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.