PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Just have one form post to the next one, etc. If you want the back & forth to work, you'll have to put all the form data into a var on the receiving end, and put it into the Back and Forward links, respectively.
foobar wrote:Just have one form post to the next one, etc. If you want the back & forth to work, you'll have to put all the form data into a var on the receiving end, and put it into the Back and Forward links, respectively.
Im a bit of a newbie so can you just explain how to send the form to the next.
Ive only set up forms which just get submitted to mail.
<?php
$name = $_POST['users_name']; //the value of the POST must be the same name as the form field value.
echo $name;
// ECHO OUT MORE FORM STUFF
//but if you want to carry variables from page to page, you could do it like this.
//For ever form value you capture on any page, you need to have the same number of hidden fields at the end of the form.
//the hidden field value needs to echoed out to the value in order for the form to take the value with it.
echo "<input type=\"hidden\" name=\"users_name\" value=\"". $name ."\">";
//on the next you would repeat something like the $_POST['users_name'] above.
?>