1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Help!

Discussion in 'Web Design' started by alexel, Oct 28, 2015.

  1. alexel

    alexel Jr. VIP Jr. VIP

    Joined:
    Feb 20, 2015
    Messages:
    227
    Likes Received:
    64
    Location:
    New York
    I'm having a tough time figuring this out.

    In a php URL such as this current threads URL, it has a parameter of a variable name and the value... /blackhat-seo/newthread.php?do=newthread&f=126.. What is the proper name for it? And how is it written?
     
  2. BlackFrost

    BlackFrost Junior Member

    Joined:
    Jan 21, 2012
    Messages:
    109
    Likes Received:
    50
    Occupation:
    Toal noob IMer
    Location:
    Aussie in Scotland
    • Thanks Thanks x 1
  3. alexel

    alexel Jr. VIP Jr. VIP

    Joined:
    Feb 20, 2015
    Messages:
    227
    Likes Received:
    64
    Location:
    New York
    Thank you BlackFrost. I was able to use the GET variable for the customer to validate other information (email, name, etc) through the usage of forms and getting the values and names of the inputs. I need help on providing the information of the package they have chosen and the price through the selection of an <a href> tag from page 1 before ending up on page 3, where validation is required for checkout.

    Page 1 is the selection of package, Page 2 is the information such as their email, name, etc. is submitted, and Page 3 is the info validation page.
     
    • Thanks Thanks x 1
  4. BlackFrost

    BlackFrost Junior Member

    Joined:
    Jan 21, 2012
    Messages:
    109
    Likes Received:
    50
    Occupation:
    Toal noob IMer
    Location:
    Aussie in Scotland
    No worries, if you're using forms then you'd probably be better off using post, basically the same thing but done without changing the url: http://php.net/manual/en/reserved.variables.post.php

    Just change your method="" from get to post and use the same way, as for keeping the info between forms have a look into sessions, you can store whatever you need in these just like a normal variable but it's retained across page loads, I'm no expert and have no idea how long these sessions last but I believe it's until they leave the site
     
    • Thanks Thanks x 1
  5. alexel

    alexel Jr. VIP Jr. VIP

    Joined:
    Feb 20, 2015
    Messages:
    227
    Likes Received:
    64
    Location:
    New York
    You just ended my four day dread of non-stop confusion and frustration! Thank You BlackFrost.
     
    • Thanks Thanks x 1
  6. BlackFrost

    BlackFrost Junior Member

    Joined:
    Jan 21, 2012
    Messages:
    109
    Likes Received:
    50
    Occupation:
    Toal noob IMer
    Location:
    Aussie in Scotland
    You're welcome mate, someone more experienced could have conveyed it better but I'm glad I could help!
     
    • Thanks Thanks x 1