Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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-)

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...