The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

if(($email_check > 0) || ($username_check > 0)){
echo "Please fix the following errors: <br />";
if($email_check > 0){
echo "<strong>Your email address has already been used by another member in our database. Please submit a different Email address!<br />";
unset($theEMail);
}
if($username_check > 0){
echo "The username you have selected has already been used by another member in our database. Please choose a different Username!<br />";
unset($theUserName);
}
include 'register_form.html'; // go back to register_form.html
exit(); // exit, the account will not be created
}

/* Everything has passed both error checks that we have done.
It's time to create the account! */
// Enter create a user account

Also, the LAST insert query, make insert into capitalised (INSERT INTO) and values the same (VALUES).

Can you post what is being outputted by the browser aswell please. Anything that is outputted will be helpfull.

If knowledge is power - Why isn't our army librarians?!Statistics show that 63% of all statistics are fake.When i was little i broke my neck, and i havent looked back since .
I completed the internet in 1 week. The end boss was pretty easy though .

If knowledge is power - Why isn't our army librarians?!Statistics show that 63% of all statistics are fake.When i was little i broke my neck, and i havent looked back since .
I completed the internet in 1 week. The end boss was pretty easy though .

Just to make sure there's no confusion about what i said in the above post.
The syntax you are using is allowed and possible but should be avoided - too many pitfalls:

The VALUES list must contain one value for every column (field) in the table.
Furthermore, the values must be listed in the same order in which the columns are named in the table's definition.
This makes it pretty unhandy.

We are the Borg. Resistance is futile. Prepare to be assimilated.I'm Pentium of Borg.Division is futile.Prepare to be approximated.

thank you very much Frezon and all other helpers
but sorry I still cann't get it work
Error messenge:
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 'user(null,firstName,lastName,userName,password,eMail,fColor,fAn

php version 4.3.6
P.S: There is no space - '$the EMail' - I don't why it print out like that

SpikeZ, thank you for your enthusiastic
did you run the code Successfully?

no, still not right, there must be something wrong but I just couldn't find it , so sad
well I guess I will rebuild the code in other way
I think I have wasted too much time on finding errors
and the wasted time is enough for me to build another which might be working, but I really want to know where goes wrong
once again thank you for your help SpikeZ

Ok, DrunkPanda, can you put all the problems your getting, then the current code you have, into 1 thread, nice and neatly, and the problem should be solved , because i am just lost.

If knowledge is power - Why isn't our army librarians?!Statistics show that 63% of all statistics are fake.When i was little i broke my neck, and i havent looked back since .
I completed the internet in 1 week. The end boss was pretty easy though .

Ok, DrunkPanda, can you put all the problems your getting, then the current code you have, into 1 thread, nice and neatly, and the problem should be solved , because i am just lost.

Hi 1337-Dev
Sorry about that, below is my current code and error
messenge and some information you might want to know.

Error Messenge form mysql_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 'user(userID,firstName,lastName,userName,password,eMail,fColor,f
---------------------------------------------------------------
Just in case you want to know
PHP Version 4.3.6
register_globals On
Apache Version Apache/1.3.29 (Win32) PHP/4.3.6
and I don't know why everytime I post code on this thread there is always a space like this: "$theE Mail'
it looks ok on my editor

if(($email_check > 0) || ($username_check > 0)){
echo "Please fix the following errors: <br />";
if($email_check > 0){
echo "<strong>Your email address has already been used by another member in our database. Please submit a different Email address!<br />";
unset($theEMail);
}
if($username_check > 0){
echo "The username you have selected has already been used by another member in our database. Please choose a different Username!<br />";
unset($theUserName);
}
include 'register_form.html'; // go back to register_form.html
exit(); // exit, the account will not be created
}

/* Everything has passed both error checks that we have done.
It's time to create the account! */
// Enter create a user account

thanks Helge, I have done the comma thing, but the problem is still there
and I used --- echo "<p>$aSQL</p>"; shows below
--------------------------------------------------------------------
insert into user(userID,firstName,lastName,userName,password,eMail,fColor,fAnimals,fEngine)
values(null,'Mark','Li','DoCoMo','1234','php@yahoo.com','white','Mouse','www.google.com')

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 'user(userID,firstName,lastName,userName,password,eMail,fColor,f
---------------------------------------------------------------------
it look like I have get all the data but it just couldn't insert into database
so that make me think its there any wrong with this
would the foreign key be a problem?
------------------------BuildDataBase.php-----------------------

If knowledge is power - Why isn't our army librarians?!Statistics show that 63% of all statistics are fake.When i was little i broke my neck, and i havent looked back since .
I completed the internet in 1 week. The end boss was pretty easy though .

although I still couldn't find the problem
I appreciated all your guys who have tried to help me
and at this stage I think the cause of the problem is my limited
knowledge of PHP which make a small error become such a big problem
so I think the best way for me now is to do some more tutorials rather
then hanging there with the error

if(($email_check > 0) || ($username_check > 0)){
echo "Please fix the following errors: <br />";
if($email_check > 0){
echo "<strong>Your email address has already been used by another member in our database. Please submit a different Email address!<br />";
unset($theEMail);
}
if($username_check > 0){
echo "The username you have selected has already been used by another member in our database. Please choose a different Username!<br />";
unset($theUserName);
}
include 'register_form.html'; // go back to register_form.html
exit(); // exit, the account will not be created
}

/* Everything has passed both error checks that we have done.
It's time to create the account! */
// Enter create a user account

If knowledge is power - Why isn't our army librarians?!Statistics show that 63% of all statistics are fake.When i was little i broke my neck, and i havent looked back since .
I completed the internet in 1 week. The end boss was pretty easy though .