Hey guys, only new to Daniweb, so pardon me, if i seem too "nooby" for you guys.
I am building a website, and currently am working on the "members area"
i have a database named "users" with fields "name", "username", "email", and "password".
i am running a php script, and haved tested myself (by "echoing" until i find the line that screws up) that this line of code
$sql = mysql_query("INSERT INTO c944978_member_database.users (name, email, username, password)
VALUES('$name', '$email', '$username', '$db_password'") or die (mysql_error());
when the php file gets to this line it gives this error:
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 2
Not sure what this means, have done some googling, and found that it is too do with the SQL Database.. but am very new to this so cant find my error.
my sql database is:
CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
name varchar(25),
email varchar(25),
username varchar(25),
password varchar(255),
PRIMARY KEY (userid)
) TYPE=MyISAM COMMENT='Membership Information';
I got this as a template from, www.1stoptutorials.com, where i watched tutorials, and changed some of the code to suit my website.
If somebody can point out, why im getting this error, it would be much appreciated :)
James, Gobble45