Solved

Passing on a variable to a new page

Posted on 2003-11-20
2
229 Views
Last Modified: 2010-07-27
If I call a URL "...page.php?var=someval..", I don't get a value in page.php for $_POST['var']. What's wrong?
0
Comment
Question by:AntonBotes
2 Comments
 
LVL 1

Accepted Solution

by:
show_source earned 50 total points
ID: 9790253
When calling like that, you shall use $_GET["var"]
$_POST["var"] comes from a submitted form
0
 

Expert Comment

by:russelldav
ID: 9796719
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
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question