Solved

Passing on a variable to a new page

Posted on 2003-11-20
2
230 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

792 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