Display array result on another page

Hello

I have two pages.

Index.php (Contains a login form)

Login.php (Processes the login data)

In the Login.php page, any errors are stored in an array and displayed on that same page.
I want to redirect the user to Index.php and display the error data on that page.
What is the best way to do this?

do your form processing on index.php instead?

Hi Jaynesh,

So you have database, because you could use PHP searialize function and write it to a table in your database, then write a session variable that ‘errors:1’ and then test on the session, retrieve and unserialize the data and display.

Alternatively you can post the errors to the index.php page and check if the errors post values have been set, if so display them.

You could also write the errors to the users session although this is not intended for a large amount of data.

Regards,
Steve