Ok can anyone help me a bit?
I got part of this working i can create a form that nicely sits in a page on my website. I did this by entering the following into a view.php for a module i have created which is installed in a folder called ordering in my modules folder:
require('../config.php');
// prevent this file from being accessed directly
if (!defined('WB_PATH')) die(header('Location: ../../index.php'));
// output a message when the module is opened in the WB backend
?>
<h1>Order Form</h1>
<form action="<?php echo htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])); ?>" method="post"><input type="hidden" name="agent" value="<?php echo $_SESSION['USERNAME'] ?>"/>
Type: <input type="text" name="type" /><br> House Number: <input type="text" name="housenum" /><br>
<input type="submit" />
<input type="hidden" name="submitted" id="submitted" value="0" />
</form>
I would rather sumbit the form to another page than to itself to be honest as that page will be the admin page for a user logged in and will have other options to view history etc once that have finiished submitting.
My question is i can get it to submitt to anotehr page easily say i call it insert.php BUT I dont know how to make that page include the tempalte layout rather than it just being a blank page with a message saying submitted?
How do i include the atcual template header and fotter etc and then display my page saying successful???
Any help much appreciated from someone learning php and website baker
