Php Variables

Discussion in 'PHP' started by jessysmith1234, Feb 19, 2013.

  1. #1
    How many ways we can pass the variable through the navigation between the pages?
     
    jessysmith1234, Feb 19, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    just one? if you only want to be secure :) $_SESSION
     
    EricBruggema, Feb 19, 2013 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Eric is right in terms of ACTUALLY passing values client-side. As a rule of thumb that's sloppy/insecure and why it's best to only pass one value -- a PHPSESSID cookie (used by PHP Sessions) or your own hash for database driven sessions. Apart from that you shouldn't be passing 'variables' client side in the first place.

    Though a LOT of your scripttards don't entirely grasp that concept. I was cleaning up a system a couple years ago that BLEW MY MIND how ridiculously bad it was given it was passing hashed versions of the SQL username, password and host as hidden fields. HERPAFREAKINGDERP. That's dumber than putting them in DEFINE.
     
    deathshadow, Feb 19, 2013 IP
    Syndication likes this.