PDA

View Full Version : @POST information



syco__
10-16-2011, 11:47 AM
Is there away to send information to another page without using a submit button? Is this the time i should be using SESSIONS?

mlseim
10-16-2011, 03:19 PM
It depends on what you're sending. A simple, "doesn't matter if anyone sees it",
type of value, you can use $_GET, with a URL variable. If it's more complex,
or you want to keep the URL clean, you can use SESSION. Or use CURL.

RefluxLtd
10-17-2011, 10:48 AM
Use $_GET or Sessions :)

$_GET would make a url look like: login.php?user=admin
Then, use $_GET["user"] to see what's behind 'user=' (would result in 'admin')
Sessions on the other hand, are alot more secure, yet more complex...

-RefluxLtd ;)

DJCMBear
10-17-2011, 11:05 AM
Use $_GET or Sessions :)

$_GET would make a url look like: login.php?user=admin
Then, use $_GET["user"] to see what's behind 'user=' (would result in 'admin')
Sessions on the other hand, are alot more secure, yet more complex...

-RefluxLtd ;)

Try aren't complex as it is only changing the $_GET to $_SESSION how ever with sessions you have to use session_start() to be able to use it so there isn't much difficult's to using sessions.

tracknut
10-17-2011, 04:25 PM
Or you could use a cookie. Not saying you should in this case, but just listing it for completeness of your options.

Dave