By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,997 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,997 IT Pros & Developers. It's quick & easy.

register_globals=OFF + email signup validation ??

P: n/a
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_globals" set to ON.

How is this achieved with "register_globals" set to OFF?

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

Cheers

Phil

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Phil Latio wrote:
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_globals" set to ON.

How is this achieved with "register_globals" set to OFF?

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

Cheers

Phil


Phil,

register_globals should have no effect here - and there is nothing you
can't do with register_globals off that you can do with register_globals
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #2

P: n/a
> Phil,

register_globals should have no effect here - and there is nothing you
can't do with register_globals off that you can do with register_globals
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.


Many thanks for your reply.

Typically 5 minutes after I post I finally find a tutorial that suits my
needs. :))
http://www.phpfreaks.com/tutorials/40/0.php

Cheers

Phil
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.