Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4081348
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:02:56+00:00 2026-05-20T18:02:56+00:00

I have a doubt about how I can check an URL like this: http://your.url/set_new_password.php?userid=564979&code=54c4a2767c2f485185ab72cdcf03ab59

  • 0

I have a doubt about how I can check an URL like this:

http://your.url/set_new_password.php?userid=564979&code=54c4a2767c2f485185ab72cdcf03ab59

I need to check if the userid exists in the database and if the userid is associated to the hash in the link.

I Read that it is not possible check the url within php. If so, is it possible to solve this problem? I need to verify if the hash and userid present in the link exist in the database.

Any other alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:02:57+00:00Added an answer on May 20, 2026 at 6:02 pm

    The variables userid and code in the URL are made available to PHP in an array called GET:

    echo $_GET['userid']; // 564979
    

    If you have a hash (or fragment) in your URL, this won’t get back to PHP:

    www.mysite.com?val=1#part2
    

    In the above, PHP can see the domain and the val variable, but not #part2. Sites that use the hash to significantly change the page (eg GMail) use javascript to pull in new content when the hash changes.

    Be sure to sanitize your variables before using them, to avoid malicious users being able to hack into your system. This is a big topic, but read up on the following:

    • Data Filtering
    • PHP Data Objects
    • Sanitize and Validate Data with PHP Filters

    If you don’t sanitize, someone could change your url so that the variable is set to:

    ;DELETE * FROM mytable;
    

    When you query your db without sanitising your inputs, you could lose all your data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have some doubt about PHP based web crawlers,can it run like the java
I have a doubt about orkut's new URL Writing method. Earlier the home page
I have little doubt about string reading in C. string reading functions like gets,
I'm in a bit of a doubt about this subject. Situation: I have conducted
Hello i am new in iphone development, I have some doubt about this ,
i have doubt about how can i iterate into a group of div, my
I have this doubt for a long time... hope anyone can enlight me. Suppose
I am having this doubt about multi-threading and I have faced lots of questions
Possible Duplicate: Webforms to Winforms guys i have this doubt, can i go into
I have read about DFS and BFS many times but I have this doubt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.