Solved

Passing on a variable to a new page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now