Save data from a search to a page

Asked

Viewed 44 times

0

Guys, I have the following situation: I have a simple PHP page where I have a search filter that allows me to search by Status, CPF/CNPJ, Social Reason/Full Name, Start Date and End Date. After performing the search, the system brings me the database data in the datatable. So far so good, the problem is the following: if I edit or delete some information from this table, when I return to this same page, I lose the search information and consequently it is necessary to type everything again so that I can have that data again. I wonder if anyone knows any way to save the data from this research? I thought about the possibility of saving this research data inside Sesssions, would it be the best way out? If yes, you would be able to execute the search form action within this same page or you would have to exit it as well, call a new page to save the data to Session?

1 answer

0

Try using a setcookie("name","value",time()+$int); and $_COOKIE["name"] it’s simpler I think.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.