Solved

Passing on a variable to a new page

Posted on 2003-11-20
2
227 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
Comment Utility
When calling like that, you shall use $_GET["var"]
$_POST["var"] comes from a submitted form
0
 

Expert Comment

by:russelldav
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

15 Experts available now in Live!

Get 1:1 Help Now