I want to send the 'user id' from one page to another page. but the condition is that I want to send the data in a secure manner. I am able to send the ID through GET Method.
Suppose I send the data using GET method using this way.
<a href="profile.php?id=<?php ; echo $id ; ?>">
for Eg. This is the URL that I am getting :
http://localhost/joli/profile.php?id=23
and My profile.php contains the following code :
include ('header.php') ;
if($_SERVER['REQUEST_METHOD'] =="GET")
{
echo "YES" ;
}
else{
echo "NO";
}
include('footer.php') ;
?>
Now the Problem is, If I directly access the URL . the page gets Loaded and Prints "YES". I want some limitation that User can't fetch the information directly through URL. This Page should deliver the data only when the Read more button is pressed from the previous page.
I hope my question is clear.