Re: HTML_Select
| From: | Martin Jansen | Date: | Sat, 02 Feb 2002 10:07:34 +0000 |
| Subject: | Re: HTML_Select | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-763@lists.php.net to get a copy of this message | ||
On Fri, 1 Feb 2002 17:05:10 +0200, Alecs wrote:
>Whenever I tried to execute this code
>
>require_once "DB.php" ;
>require_once "HTML/Select.php" ;
>
>$db = DB::connect("$db_type://$db_user:$db_pass@$db_host/$db_name",
>$db_pipe) ;
>
>
>$req_people = "SELECT p.username, p.person_id FROM persons p" ;
>$select = HTML_Select::HTML_Select('select_owner') ;
>#$select->loadDbResult($db, $req_people) ;
>
>I got this error : Fatal error: Call to a member function on a non-object in
>HTML/Common.php on line 61
>and the line 61 is:
> function HTML_Common($attributes=null, $tabOffset=0)
> {
> $this->setTabOffset($tabOffset); # THIS ONE
>
>Any ideas ??
Looks like you have to create a new HTML_Select object:
$select = new HTML_Select("select owner");
instead of
$select = HTML_Select::HTML_Select('select_owner') ;
- Martin
--
Martin Jansen, <mail@martin-jansen.de>
http://www.martin-jansen.de/