Question

My $_POST value works in Chrome, and Opera, but when I open the same page, in IE or FF, it displays nothing. Even if I type in the URL the value, it doesn't work. Only if I write it in directly the PHP file. What could cause that?

if (isSet($_POST['check'])) {
    list($date,$room) = explode('/', $_POST['check']);

Thats where my code shows i have no $_POST['check']..

I open up this page like so:

<a href='?op=reserve&check=".$times[$c].'/'.$row["ID"]."'>
    <input type=\"image\" src=\"images/background/".$ico.".png\"/>
</a>
Was it helpful?

Solution

If you write any value in URL it is not $_POST value but $_GET value.

If you launch url:

http://localhost/index.php?id=2

you should in your php code use:

$_GET['id']

to determine what's the value if id in URL

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top