if (isset($_POST['submit'])) {
// Check which form was submitted
if (isset($_POST['frm1'])) {
// Process frm1 data
}
else if (isset($_POST['frm2'])) {
// Process frm2 data
}
}
save1.php, save2.php เป็นฝั่ง server ก็เขียนเช็ค POST จาก submit ธรรมดา
save1.php
<?php
if (isset($_POST['frm1_submit'])) {
// Process frm1 data here
// For example, you could retrieve the form data like this:
$field1 = $_POST['field1'];
$field2 = $_POST['field2'];
// You can then perform any necessary validation or processing on the data
// Once you're done processing the data, you could redirect the user to another page
header('Location: success.php');
exit;
}
?>
save2.php
<?php
if (isset($_POST['frm2_submit'])) {
// Process frm2 data here
// For example, you could retrieve the form data like this:
$field3 = $_POST['field3'];
$field4 = $_POST['field4'];
// You can then perform any necessary validation or processing on the data
// Once you're done processing the data, you could redirect the user to another page
header('Location: success.php');
exit;
}
?>