[SOLVED] INSERT INTO... syntax error
Posted: Tue Jun 29, 2004 11:26 am
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:
Here's the error message:
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());
?>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?
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