Jump to content
MakeWebGames

Problem with Registration.php!


Absolute Zero

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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