conf problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • leo

    conf problem?

    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";


  • Andy Jeffries

    #2
    Re: conf problem?


    OK, I'll start off with a "Huh?!" as this post doesn't make much sense,
    but then I'll try to provide help.
    [color=blue]
    > 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?[/color]

    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

    Comment

    • Erwin Moller

      #3
      Re: conf problem?

      leo wrote:
      [color=blue]
      > 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";[/color]

      Yes, it is in php5.


      FROM MANUAL:
      -------------------------
      register_long_a rrays 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

      Comment

      Working...