Fetch parameter from URL

Asked

Viewed 1,463 times

0

I’m creating a site that has email registration validation. Thus, when registering, the user receives a welcome email containing a link to activate his registration and only then can access his User Panel. Thus, when registering, in the database the column u_ativo receives N. By email he receives a link that when clicking goes to the site:

www.nomedosite.com/[email protected]&id=8378472327

When calling this page when the user clicks on the email link, I need to set the column 'u_ativo' = 'S', taking the parameters of the URL to see which user is activating the registration. As for the data, I will encrypt and compare. My problem is that I am not able to get the parameters of the URL, as for example, using $id = $_REQUEST['id'].

1 answer

1

Instead of $_REQUEST use $_GET or $_POST depending on the type of request.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.