Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    32
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Smile Get variables from a url, when..

    How would you get the variables/values from a url like
    image.php?base=000000&design=Tide&designcolor=FFFFFF;
    BUT do this on a different page.
    I am trying to get base colors from 2 design URLs and mixing the colors.
    Already know how to mix the colors, yet I don't know how to collect the values while on a different page then image.php
    Thanks for the help

  • #2
    New Coder
    Join Date
    Dec 2011
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Simple.

    $_GET['value'];

    Where value = your get value. Ex. Color=000&shade=FFF
    To get color and shade, you'd use the get var and put color or shade in the place of value

  • #3
    New Coder
    Join Date
    Jan 2011
    Posts
    32
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Yes, but how would I do this if I am on a different page then the url that has the values?

  • #4
    New Coder
    Join Date
    Dec 2011
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I don't understand what your saying... Sorry. Is the info posted from a form?

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,092
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Put the values into the $_SESSION array. Then they are available to any script.

    Note that you must use session_start() at the top of every script that uses sessions. It doesn't just start a session it also reopens an existing session.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •