Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to send multiple forms to php self with post

Tags:

php

I have only been able to do this with GET, How do I submit multiple forms without the previous data being lost when resubmitting a different form via POST ?

like image 505
webestdesigns Avatar asked Feb 13 '26 06:02

webestdesigns


2 Answers

Use hidden input fields?

<input type="hidden" />

Store in a session?

session_start();
$_SESSION['blarr'] = $_POST['old-data'];
like image 93
Calum Avatar answered Feb 14 '26 19:02

Calum


Persist the previous form data into a database or session.

like image 30
Adam Pointer Avatar answered Feb 14 '26 20:02

Adam Pointer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!