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

Posted by "Richard Lynch" on 11/22/05 23:47

On Mon, November 21, 2005 5:14 pm, Philip Thompson wrote:
> 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"]) {

if (isset($_POST['submitted'])){

might be better...

But what you have shown as example code "should work" I think.

Try posting the REAL code.

> // 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Like Music?
http://l-i-e.com/artists.htm

 

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

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