TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 22, 2024, 09:04:45 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 226
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 77
  • Total: 77

making profile fields 'required'

Started by disisme, February 07, 2006, 10:18:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

disisme

I'm running SMF 1.0.6, and I'd like to make certain fields in the profile mandatory (like date of birth so we can detect minors).  Anyone know how to do this?

disisme

oko...profile.php will allow me to make it mandatory.  The only problem I have is making sure they have entered a valid date.  The profile 'zeros' out the fields in birthdate irrespective.  I think I need to use the checkdate() function to verify a valid date, but I cant seem to get the syntax right (php noob here).

Can anyone tell me how to force an error if birthdate ($_POST['birthdate'] is the variable) is set to 0000-00-00?

disisme