i’ve been looking at this for quite some time and i can’t figure out what is wrong. im trying to insert a new row into my table but i keep getting the #1064 error when trying to do so. im new to this so it might be blatantly obvious to some of you…
here is my insert code:
INSERT INTO registration (`fname`, `lname`, `address1`, `address2`, `city`,
`state`, `zcode`, `dob_mon`, `dob_day`, `dob_year`,
`email`, `number`, `gender`)
VALUES (`joe`, `bob`, `123 abc`, `apt 209`, `la`,
`CA`, `99999`, `JUN`, `14`, `1999`,
`a@gmail.com`, `1234567`, `F')
and here is part of my php file
$fields = "`". implode("`, `", array_keys($register_data)) ."`";
$data = "`". implode("`, `", $register_data) ."'";
echo "INSERT INTO `registration` ($fields) VALUES ($data)";
Don’t use angled quotes for values. Try this: