Register Script
#5

I suggest using mysql_real_escape_string(), instead warmongers anti_inject(), because it will change the info from a word that contains for example IselectIT in the database it will appear IIT, and many other examples.

 

 

$accname = mysql_real_escape_string($_POST[accname]);
$accmail = mysql_real_escape_string($_POST[accmail]);
$accpass1 = mysql_real_escape_string($_POST[accpass1]);
$accpass2 = mysql_real_escape_string($_POST[accpass2]);

 

Another Thing:

You can removethis:

$result2 = mysql_query("SELECT user_code FROM newproject_db_auth.bg_user ORDER BY user_code DESC LIMIT 1",$con);
$newcode = mysql_result($result2, 0) + 1;

And this:

mysql_query("INSERT INTO newproject_db_auth.bg_user VALUES (".$newcode.", ".$accname.", , , NULL, , , 000000-0000000, M, ".$accpass1.", 0, NULL, NULL, NULL, S, ".$accmail.", NULL, NULL, 0, 0, NULL, NULL, 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0, 0 0 0 0 0 1 0, N, Y, Y, Y, N, N, Y, N, NULL, NULL, NULL, NULL, NULL, NULL, LC, LC, 0000-00-00 00:00:00, 0000-00-00 00:00:00, NULL, NULL, 0, N, N, N, N, NULL, Y, NULL, N, NULL, N)");

 

And add this instead:

] mysql_query("INSERT INTO newproject_db_auth.bg_user(user_id,name,passwd,email) VALUES(".$accname.",".$accname.",".$accpass1.",".$accmail.");");



Messages In This Thread
[No subject] - by Gothic - 10-06-2011, 12:10 AM
[No subject] - by megachombas - 10-06-2011, 10:50 AM
[No subject] - by MonarC - 11-05-2011, 11:33 PM
[No subject] - by Warmonger - 11-05-2011, 11:52 PM
[No subject] - by someone - 11-06-2011, 12:09 AM
[No subject] - by Warmonger - 11-06-2011, 12:29 AM
[No subject] - by someone - 11-06-2011, 01:27 AM
[No subject] - by Warmonger - 11-06-2011, 01:37 AM
[No subject] - by someone - 11-06-2011, 10:25 AM
[No subject] - by Warmonger - 11-06-2011, 02:04 PM
[No subject] - by Darquise - 11-06-2011, 07:21 PM
[No subject] - by blade5000 - 11-19-2011, 02:02 PM
[No subject] - by Darquise - 01-23-2012, 01:41 PM
[No subject] - by Koko - 01-23-2012, 05:25 PM
[No subject] - by pv2_002 - 05-31-2012, 11:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)