I have a page class which controls what happens within a given page. For example, the code in my index page is this:
$page=new AdminPage(); $page->action($action); $page->paint($paint); The paint and action methods simply set include files Function action($action){ include_once($this->actionRoot.$action.".action.php"); } On my test page, my paint method paints an add client form. The action of the add client form recalls the page passing in the action: action="index.php?action=addNewClient". So, when this form is submitted, the page is reloaded and $page->action("addNewClient") is called which includes the addNewClient.action.php page which simply contains the insert into the database using the $_POST vars. The problem is, this page doesn't seem to have access to the $_POST vars. To help remedy this, I added this to the end of the form: <? $posted = base64_encode(serialize($_POST)); echo '<input type="hidden" name="posted" value="'.$posted.'">'; ?> and added this in my addNewClient.action.php form: $posted = unserialize(base64_decode($_POST['posted'])); However the $_POST variables only come through after I have clicked submit twice. What's the best way to handle this? Do I simply need to pass in the $_POST array to my action script? THanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php