PHP?stuff

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The1corrupted
    New Member
    • Feb 2007
    • 134

    #1

    PHP?stuff

    I'm sorta confused on the php?stuffone=st ufftwo link extensions and just how they work. Anyone want to fill me in?
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by The1corrupted
    I'm sorta confused on the php?stuffone=st ufftwo link extensions and just how they work. Anyone want to fill me in?
    This is setting variables in the PHP page via the $_GET variable.

    http://somesite.foo/mypage.php?name =jon&toast=fren ch

    Inside the PHP script, the value of $_GET['name'] will be 'jon' and the value of $_GET['toast'] will be 'french'.

    Comment

    • The1corrupted
      New Member
      • Feb 2007
      • 134

      #3
      So if I were to apply that somewhere, it'd look a bit like this?

      [PHP]
      $_GET['foo'];

      if ($var == 2) {
      $_GET['foo']="bar";
      } else {
      $_GET['foo']="sandwich";
      }[/PHP]

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Originally posted by The1corrupted
        So if I were to apply that somewhere, it'd look a bit like this?

        [PHP]
        $_GET['foo'];

        if ($var == 2) {
        $_GET['foo']="bar";
        } else {
        $_GET['foo']="sandwich";
        }[/PHP]
        the $_GET variable is used for retrieving variables passed from other scripts or the user via the URL.

        Comment

        • The1corrupted
          New Member
          • Feb 2007
          • 134

          #5
          Basically like a session variable but without the session?

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Here is a good tutorial on $_GET usage.

            Comment

            Working...