You are here: Re: Fatal error: Call to a member function add_item() on a non-object « PHP Programming Language « IT news, forums, messages
Re: Fatal error: Call to a member function add_item() on a non-object

Posted by Michael Fesser on 02/02/07 15:30

..oO(Flic)

>Hi, I am a relative beginner with php and have run into the problem in
>the subject line. I wonder if anyone could point out what the problem
>is as I have tried a few different things and it still doesn't like
>it.
>
>The code itself is:
>
>if($_POST['add']) {
> $product = $products[$_POST['id']];
> $cart->add_item($product['id'],$product['price'],$product['name']);
>}
>
>with the add_item line being the problem.

The error message is pretty clear. Where is $cart coming from?

Micha

 

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

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