Including classes

From: Date: Mon, 21 Nov 2005 23:14:12 +0000
Subject: Including classes
Groups: php.general 
Request: Send a blank email to php-general+get-226244@lists.php.net to get a copy of this message
Hi all. Here's what's going on. I have a page which calls itself in a <form>. On this page, I include two classes from other file I've created. On load, the page reads the class stuff just fine. If I submit the form (call the page again), then the class doesn't like to show any results. <code> <? require ("myclass1.php"); require ("myclass2.php"); if ($_POST["submitted"]) { // do stuff which includes the class - this does not work } else { // do stuff which includes the class - this works fine } ?> <form action="thispage.php"> <!-- stuff that uses the class info --> <input type="hidden" name="submitted" value="1" /> </form> </code> Any thoughts on why the class is not working after the submit? I have tried using <code>require_once ("myclass1.php");</code>, but that does not work either. Any suggestions would be greatly appreciated! Thanks in advance. ~Philip

« previous php.general (#226244) next »