As a complete foetus in the world of php for web forms Ive gone through a plantation of coffee just to get this form to ping back the info to my inbox.
But just as I thought the feeling of pushing boulders up hill was over Ive opened up another conundrum and its this:
I would like an idiots guide regarding how to get a confirmation thank you page to pop up after the user hits the submission page / order brouchure button. Whilst I know how to do a web page (well sort off) theres a bit of code I need to put in the php to get it to re-route to a thank you page.
Please could a sitepoint member give me a clue regarding what this code might be.
<?php
if('POST' === $_SERVER['REQUEST_METHOD']){
/**
* Here we would save or email
* the information sent by the form
*/
header('Location: http://www.example.org/thank-you.html');
exit;
}
header('Location: http://www.example.org/failed.html');
exit;
?>
Create a form, have it submit to the script above, it uses the [fphp]header[/fphp] function call to send a ‘location’ header indicating where the browser should go to.
Hey Ant… thats definately a hint but my brain hurts please dont make me work it out. Any chance you could spoon feed me and tell me exactly what to do with it.
I’m of course testing your altruism, if I was you I’d leave me too it