Page 1 of 1

[SOLVED] INSERT INTO... syntax error

Posted: Tue Jun 29, 2004 11:26 am
by dardsemail
Hi,

I am creating a registration form and pulling the data from a POST form.

I'm trying to create an INSERT query to insert the data and am getting a syntax error. Here's the code:

Code: Select all

<?php
@mysql_query("INSERT INTO users(firstName, lastName, username,password) VALUES($frm_firstName, $frm_lastName, $frm_username, $frm_password)") OR DIE(mysql_error());

?>
Here's the error message:

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 ' , , )' at line 1
I can't seem to correctly input the syntax! Help! I've tried $_POST['$frm_firstName'] etc... but to no avail. What am I doing wrong?

Posted: Tue Jun 29, 2004 11:32 am
by dardsemail
never mind - got it!