You are here: Including classes « PHP « IT news, forums, messages
Including classes

Posted by Philip Thompson on 11/22/05 01:14

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация