Jump to content

Best way of Passing Variables


Mr.Sonic

Recommended Posts

Hi First post here. Long time reader!

 

I'm looking to gauge the general practices of dealing with variables between pages.

 

I'd always pass my variables through the POST. Im normally always doing a post back and processing the data at the top of the page.

 

I never liked the query string as it open to manipulation, but can see its use for a search results page and saving the url.

 

I came from a ASP background and we would only use session variables for holding user login information as the windows server had a habit of restarting the pool and loosing the session. We didn't want this happening, for example, when doing an e-commerce transaction.  We always felt the post was the most robust method.

 

Now Im using php and all the great features it has. I was looking to see what the more experience php developers used and am I right sticking to the post method, or is utilising session a more modern way of doing things.

 

I've a few years experience doing web dev, just thought I touch base on a few issues to make sure I'm still heading in the right direction.

 

Thanks for any advice guys!

Link to comment
https://forums.phpfreaks.com/topic/215121-best-way-of-passing-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.