Jump to content

Posting data directly in URL


soma56

Recommended Posts

I'm trying to figure out a way to post data directly to a URL. For example:

 

<?php 
if (isset($_POST["pass"]) && ($_POST["pass"]=="$password")) {

echo "You did it";

?>

<?php 
}
else
{
  echo "<form method=\"post\"><p align=\"left\">";
  echo "<input name=\"pass\" type=\"text\" size=\"25\" maxlength=\"40\"><input value=\"Enter Pass\" type=\"submit\"></form>";
exit;
} 
?>

 

Let's assume $password is 'password'. Why can't I simply pass the information through the URL to access the page with something like this:

 

http://mypage.com/the-same-page.php?pass=password

 

 

Link to comment
https://forums.phpfreaks.com/topic/222359-posting-data-directly-in-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.