2

I have read on these pages that HTML/HTTP is stateless and so cannot retain data when moving from page to page without using Session array.

I am trying to collect user reviews for products. while entering their review, users are prompted to enter user name or email. If they have an account with us already, then they are encouraged to login and are directed to a login page. If the login email and password are right, they are redirected to the product review page to continue with the product review.

Whatever data they entered before moving over to login page, is not retained on return. If its not possible to retain the data and display, without using session variables, would it be possible to retain and display the data already entered, if i use modal dialog box for login instead?

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
tomamal
  • 31
  • 1
  • other way we can pass parameter through url – jsduniya Mar 07 '14 at 04:58
  • You are way better off using [sessions](http://www.php.net/manual/en/book.session.php) and for so many reasons. One of which, you can use the same session variable over and over, set to a particular user without having mountains of extra code. POST/GET variables can only go so far. – Funk Forty Niner Mar 07 '14 at 05:02

2 Answers2

1

you would have to submit the form details on one page and send them to the other using either $_POST or $_GET.

that way, you could pass all the information between pages.

Snappawapa
  • 1,697
  • 3
  • 20
  • 42
1

You can pass your data from your page to modal of the same page. Try this: Passing data to a bootstrap modal

However, I suggest that you use session if you're going to pass the data to more than 1 page.

Community
  • 1
  • 1
Abiel Paltao
  • 315
  • 2
  • 12