I’m new to php and i’m trying to pass a value from one to another. What I am trying to do is to get the user to select a product from a list of products and in the next page he will be able to view the information about the product. What i’ve read so far is to user the $_GET but i also read that it is very insecure. what other ways can i use?
Share
Just create a session variable:
http://php.about.com/od/advancedphp/ss/php_sessions.htm
Strong suggestion:
Work through a basic PHP tutorial or two. You can find many on the web, or in your local bookstore or magazine rack. Any of them should tell you how to use “sessions”, and many other important “basics”.
At that point, do a bit of extra reading on basic security principles. For example:
http://www.addedbytes.com/writing-secure-php/writing-secure-php-1/