doubledee Posted December 22, 2011 Share Posted December 22, 2011 Is it correct that in order to pass values from web page to web page that you either have to... 1.) Use a Cookie 2.) Use a Session 3.) Write/Read to a Database Record Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/ Share on other sites More sharing options...
ecabrera Posted December 22, 2011 Share Posted December 22, 2011 use $_GET Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300348 Share on other sites More sharing options...
doubledee Posted December 22, 2011 Author Share Posted December 22, 2011 use $_GET So you mean... 4.) Pass Values in the URL Right? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300350 Share on other sites More sharing options...
ecabrera Posted December 22, 2011 Share Posted December 22, 2011 yes Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300351 Share on other sites More sharing options...
doubledee Posted December 22, 2011 Author Share Posted December 22, 2011 Which method is best? Which method is most secure? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300354 Share on other sites More sharing options...
ecabrera Posted December 22, 2011 Share Posted December 22, 2011 i dont know which method is secure each method has its own risks so i dont what to tell you but if its something simple you can use $_GET if your doing a login form you can use SESSIONS Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300356 Share on other sites More sharing options...
doubledee Posted December 22, 2011 Author Share Posted December 22, 2011 i dont know which method is secure each method has its own risks so i dont what to tell you but if its something simple you can use $_GET if your doing a login form you can use SESSIONS What if I'm passing error codes from my "Create an Account" form/script to my "Processing Results" script? Could I write things to MySQL and then query the record and display the results? Would a Session be secure enough? Or maybe I should store a Session in my Database?! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300360 Share on other sites More sharing options...
ecabrera Posted December 22, 2011 Share Posted December 22, 2011 What if I'm passing error codes from my "Create an Account" form/script to my "Processing Results" script? can you explain your self a little better Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300363 Share on other sites More sharing options...
doubledee Posted December 22, 2011 Author Share Posted December 22, 2011 What if I'm passing error codes from my "Create an Account" form/script to my "Processing Results" script? can you explain your self a little better My "Create an Account" script tries to register a User. During the form handling, I assign different "Outcome Codes" to a variable. My script then redirects to a page that displays the outcome. For example... 111="Your account has been created." 234="Username already exists. Try again." 666="A system error occurred. Pelase contact the administrator." And so on... I need to pass any codes from my "create-account.php" script to the "processing_page.php" script in a secure manner (i.e. users can't see the codes.) Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300365 Share on other sites More sharing options...
scootstah Posted December 22, 2011 Share Posted December 22, 2011 Users can manipulate cookies and get data, so sessions is really the only secure option here. However, sessions isn't really "secure", but for this case it should be fine. Quote Link to comment https://forums.phpfreaks.com/topic/253650-passing-values-between-pages/#findComment-1300393 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.