Solved

Passing on a variable to a new page

Posted on 2003-11-20
2
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Simple function not working 7 44
Php logic to add to date card 9 39
CURL sending XML without spaces PHP 5 38
assigning javascript variable to php variable 8 43
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

726 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