I have three pages start.html page2.php and final.php
start.html takes some form data variables (firstname,lastname,city,state) and sends it to page2.php using POST forms.
I then want to send those post variables on to final.php using different methods. firstname and lastname as query string (GET variables) and city and state as hidden variables to be passed via POST to page3.
I understand how to do each separately but is it possible to do both at a time?
what I have tried, which is a best guest, on page2.php:
<?php
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$city = $_POST['city'];
$state = $_POST['state'];
$url = "final.php?firstname=".$firstname."&lastname=".$lastname;
<form action="<?php echo $url; ?>" method="post">
<input type="hidden" name ="city" value="<?php echo $city; ?>">
<input type="hidden" name ="state" value="<?php echo $state; ?>">
<input type="submit" value="next page">
</form>
?>
or a header(location: $url);
maybe use href?