PDA

View Full Version : can't registered


zhiichiro
06-01-2009, 08:36 PM
can't register a new account on my site it says:

Something is Wrong!

Something is very, very wrong. Please contact Rusnak PHP Scripts about this error.

my last registered user is bloodrun =.="

any help?

Bloodrun
06-01-2009, 08:43 PM
Then, go to your register.php file, find where it says:

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1', '$email', '3', '1', '$date', '0')");


and place this at the very end:

, ''

So that it will looks like this:

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1', '$email', '3', '1', '$date', '0', '')");


Why do we do this?
Let's let BMR777 explain that one:
Adding an extra field onto the users table requires you to edit register.php so the SQL query for creating a new user matches with the new database table structure. Failure to do this will BREAK the user registration system.

zhiichiro
06-01-2009, 08:48 PM
ok tnc

BMR777
06-01-2009, 08:49 PM
That error occurs only if the system cannot automatically log in the new user after registration, which normally should never happen. What modifications have you made to register.php or to the script in general?

zhiichiro
06-01-2009, 08:51 PM
i cant find that..

only this :

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0',''),''),''),'')");[hr]
i didnt do anything on register.php

Bloodrun
06-01-2009, 08:56 PM
i cant find that..

only this :

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0',''),''),''),'')");[hr]
i didnt do anything on register.php


omg, well theres your problem.
You only need the two parenthesis at the end, it should look like this:

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0','','','','')");

zhiichiro
06-01-2009, 08:56 PM
change it already to

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1', '$email', '3', '1', '$date', '0', '')");

Bloodrun
06-01-2009, 08:58 PM
change it already to

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1', '$email', '3', '1', '$date', '0', '')");


No, you need those other ones, because the of spaces needs to match up with your adopts_users table.

zhiichiro
06-01-2009, 08:59 PM
i cant find that..

only this :

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0',''),''),''),'')");[hr]
i didnt do anything on register.php


omg, well theres your problem.
You only need the two parenthesis at the end, it should look like this:

mysql_query("INSERT INTO ".$prefix."users VALUES ('', '$username', '$pass1','$email','3','1', '$date', '0','','','','')");


done. still can't register

Saphira
06-01-2009, 09:04 PM
how many fields do you have in your adopts_users table in your database?

zhiichiro
06-01-2009, 09:21 PM
there are ten.. the yahoo msn others + age location and others from profile modification, which i removed on profile.php and account.php..

and there's only 6 ,'' ..... i just added 4, so it will be 10. and it works

everyone... pls try to register :) the link is on my signature.

thnx for the help