MyBB Community Forums

Full Version: [B] [Problem]Registration Birthday Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I tried registering on http://forums.thefreelancemind.com, and I entered a random birthday (I was born in 1637 lol)

Either way, everything went fine and dandy, until the very last section of registration, where it kept giving me

Please correct the following errors before continuing:

* The birthday you entered is invalid. Please enter a valid birthday or leave the field empty.

The problem with this is that you can't go to the first page and fix the error, so you'd need to redo the entire registration. Is there any way someone can change it so that error comes up on the Birthday page instead?
Occurs in Firefox.

IE, and Chrome are fine.
This post is over 3 months old Confused
Moved to correct forum..
Yeah... like someone is 400 years old. Either this gets moved back to support or marked as bogus?
Probably marked as bogus. It definitely shouldn't be able to go that low though, to be honest. Maybe check if it's less than 19xx?

$date = substr(2, 0, $realDateHere);
if($date < 19)
 {
  // Continue
  if($date1 < LIMIT_HERE)
   {
    echo "You cannot have a date less than {$date1}.";
   }
 }
else
 {
  echo "You cannot have a birthday that low";
 }
(2009-01-27, 01:32 AM)TomL Wrote: [ -> ]Probably marked as bogus. It definitely shouldn't be able to go that low, to be honest. Maybe check if it's less than 19xx?

It does?
(2009-01-27, 01:32 AM)TomL Wrote: [ -> ]
$date = substr(2, 0, $realDateHere);
if($date < 19)
 {
  // Continue
  $date1 = substr(0, 2, $realDateHere);
  if($date1 < LIMIT_HERE)
   {
    echo "You cannot have a date less than 19".LIMIT_HERE.".";
   }
 }
else
 {
  echo "You cannot have a birthday that low";
 }
Maybe we could try this just to see if it'll work? I mean, I'm not a developer, but it sounds logical to check it. I definitely think a check should be done to make sure that the age that it would generate is logical.
Maybe I'll try my own fix tonight to see if it works..
Note: You'll need to change $date to = the actual date value the user entered. Also you can adjust $highestEnd to what you want.
But if someone wants they can try this on localhost:
$date = "1900";
$highestEnd = "00";
if($date <= "19".$highestEnd)
 {
  // It's good, continue..
  echo "It's good:)";
 }
else
 {
  // Show an error that the age is too big..
 }
Erm Tom, what do you think the "* The birthday you entered is invalid. Please enter a valid birthday or leave the field empty." error is for??
Pages: 1 2