Absolute Zero Posted August 29, 2007 Posted August 29, 2007 "; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("Your IP has been banned, there is no way around this. Quote
UCC Posted August 29, 2007 Posted August 29, 2007 Re: Problem with Registration.php! How about you tell us what the problem is and we help you figure out the solution? Quote
Decepti0n Posted August 29, 2007 Posted August 29, 2007 Re: Problem with Registration.php! Try adding $gender = mysql_escape_string($_POST['gender']); before this line: mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level ...... etc etc Quote
Absolute Zero Posted August 29, 2007 Author Posted August 29, 2007 Re: Problem with Registration.php! Thanks Decepti0n worked like a charm 8-) +1 Noob moment but, I probably havent looked hard enough, don't know how to make a minimum to maximum amount of characters for names and password. Example: Names: 3 to 12 Characters Password: 5-12 Characters Thanks for the help in advance -Absolute Zero Quote
Decepti0n Posted August 29, 2007 Posted August 29, 2007 Re: Problem with Registration.php! <?php if (!eregi("(.+){3,12}", $_POST['username'])) die('username between blah blah'); if (!eregi("(.+){5,12}", $_POST['password'])) die('ya'); ?> Just remember that even if their password is 5 characters, in the database since it's md5'd it'll be 32 or however long they are Quote
Absolute Zero Posted August 30, 2007 Author Posted August 30, 2007 Re: Problem with Registration.php! When using that code deception any amount of characters inputed into the field automatically produces the die message, any idea why? Thanks Again Deception, your a big help 8-) Quote
Decepti0n Posted August 30, 2007 Posted August 30, 2007 Re: Problem with Registration.php! Dunno lol, it might be a few things in the wrong place If you don't really care about telling them if it's too short or if it's too long, just that it's either, you can try if (strlen($_POST['username']) < 3 || strlen($_POST['username']) > 12) exit; for example Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.