PHP session variable pass?
-
Hi. i have several pages. 1. page login. in login page i am taking his/her id. And in 2. page, i am checking if id is true. If id is true i am showing his/her name and other personal informations. The problem is, i have 2 buttons next and back. When he click next button, he will go 3. pages. It works fine, but when i want to back to first page, if does not work fine. <form action="test.php" method="post"> <table> <tr> <td cols=2> <input size="3" maxlength="3" name="kod"></td> <tr><td><input value="<< Back " name="giris" type="submit"> </td> <td><input value="next >>" name="giris" type="submit"> </td></tr> </table> </form> The form is wrong i know but i donno how to make true. How can i search on google to solve this problem? How can i find a php example ?
-
Answer:
you need to add the session_start() on the login page and make sure that you pass the login details / variables to the $_SESSION
guych at Yahoo! Answers Visit the source
Other answers
Can you explain in more detail what you mean? They press back from page 2 and are taken back to page 1. What is your intended result? That they login again, or that page 1 checks for a valid session variable?
geekfound
Related Q & A:
- What is a Windows 8 'Child Session?Best solution by Stack Overflow
- How to pass javascript jQuery variable value in php array?Best solution by Stack Overflow
- How to pass a variable from AlertDialog to an Activity?Best solution by Stack Overflow
- How to create variable from value in variable?Best solution by Stack Overflow
- Why do we have the dollar sign before every php variable?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.