Hi All,
I am pretty new to PHP ( I am a C Programmer).
I am trying a simple shopping cart website for my friend.
IN one of the pages, I am submitting some info, which is actually not showing up in my server side php.
Below is the HTML code to submit.
<a href="cart.php?action=add&p=5&size=small"> <img src="images/add_to_cart.gif"/> </a>
I tried to check the values of the parameters using
$action = $_GET['action'] ;
Action stored empty. Then I checked the whole array
print_r($_GET) which returned
Array( )
So, for some reason the value is always empty.
I tried the declaration GLOBAL $_GET, but no use.
Any help/directions - much appreciated!
Thanks!
$_GET returns empty always
Moderator: General Moderators
- PHPHorizons
- Forum Contributor
- Posts: 175
- Joined: Mon Sep 14, 2009 11:38 pm
Re: $_GET returns empty always
Hello vjgopinath,
What is the value of the php ini setting for variables_order and arg_separator.input?
What is the value of $_SERVER['QUERY_STRING']?
You can get the php ini settings by running this script:
Cheers
What is the value of the php ini setting for variables_order and arg_separator.input?
What is the value of $_SERVER['QUERY_STRING']?
You can get the php ini settings by running this script:
Code: Select all
<?php
phpinfo();-
vjgopinath
- Forum Newbie
- Posts: 2
- Joined: Sat Aug 21, 2010 9:43 am
Re: $_GET returns empty always
Hi PHPHorizons,
Thanks for the prompt reply.
I got the below values by running phpinfo().
Pls advise
variables_order GPCS
arg_separator.input &
_SERVER["QUERY_STRING"] c=3
Thanks for the prompt reply.
I got the below values by running phpinfo().
Pls advise
variables_order GPCS
arg_separator.input &
_SERVER["QUERY_STRING"] c=3
- PHPHorizons
- Forum Contributor
- Posts: 175
- Joined: Mon Sep 14, 2009 11:38 pm
Re: $_GET returns empty always
The variables_order and arg_separator.input look good.
Do you have any idea where that c=3 is coming from? Perhaps the page you are going to is redirecting you to another page?
Do you have any idea where that c=3 is coming from? Perhaps the page you are going to is redirecting you to another page?