$_SERVER['HTTP_REFERER']
What does this store?
I’m doing some MySQL using PHP with the POST method of a form.
In my case I’m using this form
<form action="http://localhost/db/db.php" method="post">
<table>
<tr>
<td>Name:</td>
<td>
<input type="text" name="Name" value="" maxlength="100" />
</td>
</tr>
</table>
<input type="submit">
</form>
But in my db.php it does not give me any value to $_SERVER['HTTP_REFERER']
ok its pretty easy, firstly the HTTP_REFERER is not a php only thing. Its a web server thing IIS has the exact same server variable.
think of it like this, when ever a client does a request to a php page, the server collects some data, the client also sends some data. These so-called server variables are a collection of the available data in the request. I would recommend checking out not just this server variable, but infact all server variables. You’ll be surprised what data you can access, for example the client screen size, browser, operating system.
I’m sure someone will post the exact technical meaning of a server variable, but this overview I’ve given should set you straight.