PHP Help!

alexel

Regular Member
Joined
Feb 20, 2015
Messages
317
Reaction score
202
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?
 
It's "get", see here: -

Just remember you need to sanitise anything coming through there or risk an injection attack

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.
 
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
 
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: -

Just change your method="" from get to post and use the same way, as for keeping the info between forms have a look into, 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

You just ended my four day dread of non-stop confusion and frustration! Thank You BlackFrost.
 
You're welcome mate, someone more experienced could have conveyed it better but I'm glad I could help!
 
Back
Top