register_globals=OFF + email signup validation ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Latio

    register_globals=OFF + email signup validation ??

    I am newish to PHP and wish to create an authentication system where a new
    user is required to validate/complete their sign-up by clicking a link in an
    email.

    I am probably capable of putting something together where the user gets sent
    a link with a set of values but I am sure it would require
    "register_globa ls" set to ON.

    How is this achieved with "register_globa ls" set to OFF?

    Also would love read a decent tutorial on this subject with either
    "register_globa ls" set to ON or OFF.

    Cheers

    Phil



  • Jerry Stuckle

    #2
    Re: register_global s=OFF + email signup validation ??

    Phil Latio wrote:[color=blue]
    > I am newish to PHP and wish to create an authentication system where a new
    > user is required to validate/complete their sign-up by clicking a link in an
    > email.
    >
    > I am probably capable of putting something together where the user gets sent
    > a link with a set of values but I am sure it would require
    > "register_globa ls" set to ON.
    >
    > How is this achieved with "register_globa ls" set to OFF?
    >
    > Also would love read a decent tutorial on this subject with either
    > "register_globa ls" set to ON or OFF.
    >
    > Cheers
    >
    > Phil
    >
    >
    >[/color]

    Phil,

    register_global s should have no effect here - and there is nothing you
    can't do with register_global s off that you can do with register_global s
    on. You just need to do it a little differently.

    In your case, you are sending via email a link to another page. When
    they click on the page in their mail reader, the only info available to
    the page is in the request itself.

    What you need to look into is databases. Save the information before
    sending the link. Create a unique id for that row in the database
    (PRIMARY KEY) and send that in the link, i.e.



    In validate.php, retrieve the key ($_GET['key']) and use that to fetch
    the row from the database.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Phil Latio

      #3
      Re: register_global s=OFF + email signup validation ??

      > Phil,[color=blue]
      >
      > register_global s should have no effect here - and there is nothing you
      > can't do with register_global s off that you can do with register_global s
      > on. You just need to do it a little differently.
      >
      > In your case, you are sending via email a link to another page. When
      > they click on the page in their mail reader, the only info available to
      > the page is in the request itself.
      >
      > What you need to look into is databases. Save the information before
      > sending the link. Create a unique id for that row in the database
      > (PRIMARY KEY) and send that in the link, i.e.
      >
      > http://www.example.com/validate.php?key=12345
      >
      > In validate.php, retrieve the key ($_GET['key']) and use that to fetch
      > the row from the database.[/color]

      Many thanks for your reply.

      Typically 5 minutes after I post I finally find a tutorial that suits my
      needs. :))


      Cheers

      Phil


      Comment

      Working...