11-06-2011, 12:09 AM
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.");");

