469,578 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

conf problem?

leo
When i echo the $catid, it returns null. $catid is there, confirmed by
command prompt and "select table from database".

Is php needed to set anything or security issue such that $HTTP_GET_VAR
associative array can't be retrieved?

Thanks a lot
$catid = $HTTP_GET_VAR['catid'];

echo "catid at showcat: $catid";
Apr 25 '06 #1
2 1539

OK, I'll start off with a "Huh?!" as this post doesn't make much sense,
but then I'll try to provide help.
When i echo the $catid, it returns null. $catid is there, confirmed by
command prompt and "select table from database".

Is php needed to set anything or security issue such that $HTTP_GET_VAR
associative array can't be retrieved?


OK, where are you getting this $catid from? You mention getting it from
$HTTP_GET_VAR ($_GET may be better for you anyway) but then also mention
getting it from a database which has nothing to do with GET parameters and
HTTP requests.

Can you be more clear in how you're trying extract this value and from
where? Maybe with a code snippet or two.

Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

Apr 25 '06 #2
leo wrote:
When i echo the $catid, it returns null. $catid is there, confirmed by
command prompt and "select table from database".

Is php needed to set anything or security issue such that $HTTP_GET_VAR
associative array can't be retrieved?

Thanks a lot
$catid = $HTTP_GET_VAR['catid'];

echo "catid at showcat: $catid";


Yes, it is in php5.
http://nl2.php.net/manual/en/ini.cor...er-long-arrays

FROM MANUAL:
-------------------------
register_long_arrays boolean

Tells PHP whether or not to register the deprecated long $HTTP_*_VARS
type predefined variables. When On (default), long predefined PHP variables
like $HTTP_GET_VARS will be defined. If you're not using them, it's
recommended to turn them off, for performance reasons. Instead, use the
superglobal arrays, like $_GET.

This directive became available in PHP 5.0.0.

-------------------------

So use $_GET[] or $_POST[] instead of the old $HTTP_GET_VARS, or change this
in your ini-settings.

My advise would be to use $_GET[] instead.

Regards,
Erwin Moller
Apr 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Oliver Hoehle | last post: by
6 posts views Thread by David Nedrow | last post: by
5 posts views Thread by Susemail | last post: by
5 posts views Thread by Raymond O'Donnell | last post: by
1 post views Thread by jodleren | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.