I have a form that inserts data into mySQL. It works fine.
After the submission, I have a success page that displays ‘part_no’. I need to also show ‘add_qty’, as well.
How do i alter my post script to show two field data’s on the success page?
Here is part of my code (that already works):
$part_no = $_REQUEST['part_no'] ;
header("location: inv_fc_add_success.php?part_no=" . urlencode($part_no));
}
else {
header("location: inv_fc_add_fail.php");
}
?>
You need 3 things.
First, you’ll need:
Alternatively you can simply use
$_REQUEST['add_qty']directly instead of assigning it to a new variable ($add_qty).Then instead of:
you need:
Then, on the page inv_fc_add_success.php (which you will need to edit), you display the variable the same way that you display $part_no. As always, you can either assign it to a variable, like you already do at the top, or you can just use
$_REQUEST['add_qty']directory.