I have a registration form, but when the page refreshes the data is lost and the user has to enter the data again. I want the data to remain there even if the page refreshes.
I am using the serialize
function to serialize the form data but now how should I print the stored values when page is refreshed?
setcookie('formdata', serialize($formdata), time()+30*24*60*60);
But it is saving the data at the end. I want the data to be stored as soon as the user enters the value and if the page refreshes and the field was filled it should populate the data.