Hi guys,
I'd like to check if the email address users enter on the registration page is valid. For that I'd like to send an email with an activaion link. Right now I only have a form that users fill in order to register. I would very much appreciate your help.
Regards

    On the page that processes the form, you can use the mail() function to send an email to the email address the user has provided. If during processing the form you've added the user information to a database, where you also insert a random number and have an enum field set by default to 'no', you can include the url in the body of the email message, along the lines of http://www.mysite.com/mypage.php?id=$random_number, so that when they click on that link mypage.php searches the database for the $random_number and sets the enum field to 'yes'

    HTH - Blu

      Blulagoon wrote:

      On the page that processes the form, you can use the mail() function to send an email to the email address the user has provided. If during processing the form you've added the user information to a database, where you also insert a random number and have an enum field set by default to 'no', you can include the url in the body of the email message, along the lines of http://www.mysite.com/mypage.php?id=$random_number, so that when they click on that link mypage.php searches the database for the $random_number and sets the enum field to 'yes'

      HTH - Blu

      Can you explain it again?

      $random_number=any random number?

      how will the query match if it's a random number? 😕

        let me explain...

        you have a database, 3 fields as follows

        ID
        User
        Active

        you then send an email out with the id number that relates to that user.

        1,neil,0
        2,peter,0

        so you send a link yoursite.com/confirm.php?id=1

        when this link is clicked it then uses a query on your database based on the ID=1, you then update the database field 'active' to =1 instead of 0

        this would then make the user 'neil' an active user.

          n_wattam wrote:

          let me explain...

          you have a database, 3 fields as follows

          ID
          User
          Active

          you then send an email out with the id number that relates to that user.

          1,neil,0
          2,peter,0

          so you send a link yoursite.com/confirm.php?id=1

          when this link is clicked it then uses a query on your database based on the ID=1, you then update the database field 'active' to =1 instead of 0

          this would then make the user 'neil' an active user.

          oh ok thanks..yes I thnk I get it now 🙂

            Write a Reply...