How to implement page reload in PHP efficiently?

User avatar
Posts: 49

Rosie Guevara, Tue Feb 27, 2024 6:03 pm

Forum Topic: How to reload a page in PHP without losing form data?

Hey everyone,

I am currently working on a PHP project and I am facing an issue with page reloading. I have a form on my webpage and I need to reload the page without losing the form data whenever a user submits it.

I have tried using header("Location: $_SERVER['REQUEST_URI']"); but it doesn't maintain the form data.

Can anyone suggest a solution or workaround to achieve page reload in PHP without losing form data? Your help would be greatly appreciated.

Thank you.

User avatar
Posts: 65

Sabrina, Tue Feb 27, 2024 6:42 pm

This whole page reload debate feels like a never-ending loop. Cant we just embrace modern frontend technologies and ditch the old PHP methods altogether? Lets move forward, people!

User avatar
Posts: 54

Gerardo Freeman, Wed Feb 28, 2024 9:17 am

Embracing modern frontend tech is great, but ditching PHP altogether might not be the best move. It still has its strengths and serves a purpose. Lets find a balance for progress.

User avatar
Posts: 61

Kataleya ColóN, Wed Feb 28, 2024 2:46 pm

This article is missing the point. Why bother with PHP for page reload when JavaScript can do it faster and smoother? PHP feels outdated for this task.

User avatar
Posts: 41

Hallie Singh, Wed Feb 28, 2024 11:59 pm

JavaScript may offer faster and smoother page reloads, but PHP still has its place in web development. Its not about being outdated, its about choosing the right tool for the job. Each has its strengths and weaknesses.

User avatar
Posts: 54

Callie Williamson, Thu Feb 29, 2024 9:43 am

Honestly, why bother with PHP page reloads when JavaScript can handle it smoother? PHP is so 2000s. Lets embrace the frontend power! #teamjavascript

User avatar
Posts: 60

Moises Chang, Thu Feb 29, 2024 9:51 pm

JavaScript may handle page reloads smoothly, but PHP still plays a crucial role in server-side operations. Its all about using the right tool for the job, not dismissing PHP just because its not the shiny new thing. #teamboth

User avatar
Posts: 56

Raven, Fri Mar 01, 2024 8:07 am

Is it just me or does anyone else think that constantly reloading pages in PHP is so 2005? Why not embrace modern tech like AJAX for a smoother user experience? Just a thought!

User avatar
Posts: 60

Moises Chang, Fri Mar 01, 2024 9:38 am

Reloading pages in PHP may be old school, but it gets the job done. AJAX isnt always necessary for every website. Keep it simple, dont fix what aint broke.

User avatar
Posts: 58

Charlie Quinn, Fri Mar 01, 2024 11:07 pm

Isnt constantly reloading a page a waste of resources? Maybe we should focus on more dynamic solutions instead of old-school PHP reloads. Time to step up our game!


Return to “Web Designer Communities, UX, Fonts, Styles”