Announcement

Collapse
No announcement yet.

can you tell me what this code does?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • can you tell me what this code does?

    In register.php, in the "start add member" section, there is some code that seems odd. It is just about right after all the info is inserted into the user table, and it's this:
    Code:
      if ($newuseremail!="")
      {
        if ($birthday == 0) {
           $birthday = "N/A";
        } else {
           if ($year >1880 and $year<2000) {
              $birthday = date($calformat1,mktime(0,0,0,$month,$day,$year));
           } else {
              $birthday = date($calformat2,mktime(0,0,0,$month,$day,0));
           }
        }
    I'm wondering what it does, and why it's there. It formats the user's birthday, that much I can tell, but for what? It doesn't appear to display it.

    Thanks!

  • #2
    Kevin,

    It is used to format the birthday field for the email that is sent out to the admin when a new member signs up.

    You see it is only called when this option is turned on:

    PHP Code:
    if ($newuseremail!=""
    John
    John Percival

    Artificial intelligence usually beats real stupidity ;)

    Comment


    • #3
      Um...I feel stupid now!

      /me smacks myself in the head.

      Duh. Wow I must be tired. I feel stupid now. Suppose I deserve it for trying to finish this hack at this hour of the morning! Thanks for the quick response, John!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X