Forum Moderators: coopster
require_once ('..\dbc\dbc.php');
$query = "INSERT INTO users
( autoID, user_name, first_name, last_name, age, email, password )
VALUES
( '', 'mars', 'Benji' 'wall', 21, 'will@example.com', SHA('f00') )";
###############
Here's the code i created the table with in MYSQL
###############
create table users (autoID int unsigned auto_increment primary key, user_name varchar(20), first_name varchar(20), last_name varchar(20), age int, email varchar(40), password varchar(20));
###############
Curious thing - when i typed the exact same code out in mysql by hand it worked - but copy and pasting the same code doesn't.
What's going on someone please help me...
[edited by: eelixduppy at 1:18 pm (utc) on Feb. 5, 2008]
[edit reason] example.com [/edit]
$query = "INSERT INTO users
( autoID, user_name, first_name, last_name, age, email, password )
VALUES
( '', 'mars', 'Benji' 'wall', 21, 'will@example.com', SHA('f00') )";
notice the lack of a comma between my first and second names.
Man its pedantic!
well I guess I'll work on validating my forms now!
( oh god... )