Создал файл eshop.class.php Код: <?php class eShop{ function add($text){ echo $text; } } ?> Создал файл с формой add2cat.php Код: <html> <head> <title>Форма добавления</title> </head> <body> <form action="save2cat.php" method="post"> <p>title: <input type="text" name="title" size="100"> <p><input type="submit" value="Добавить"> </form> </body> </html> создал обработчик формы save2cat.php Код: <?php include "eshop.class.php"; $shop=new eshop(); $text=($_POST['title']); $shop->add($text); ?> По такой схеме всё работает, введённое сообщение выводится. Не могу понять почему не работает такая схема: add2cat.php Код: <?php include "eshop.class.php"; $shop=new eshop(); include "save2cat.php"; ?> <html> <head> <title>Форма добавления</title> </head> <body> <form action="save2cat.php" method="post"> <p>title: <input type="text" name="title" size="100"> <p><input type="submit" value="Добавить"> </form> </body> </html> save2cat.php Код: <?php $text=($_POST['title']); $shop->add($text); ?> Такая вот ошибка: Fatal error: Call to a member function add() on a non-object in..... В одном из скриптов такая схема работала. Не пойму что сейчас не так.