Passing on a variable to a new page

If I call a URL "", I don't get a value in page.php for $_POST['var']. What's wrong?
Who is Participating?
show_sourceConnect With a Mentor Commented:
When calling like that, you shall use $_GET["var"]
$_POST["var"] comes from a submitted form
use $_GET['var'] instead.

anything after the query string '?' e.g ?name=joeblogg is accessed using GEt, if it's added to the POST buffer then use POST.

Hope this helps
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.