Host unlimited blogs, sites, forums for $4.95 only with this host

Bluehost : Utter PHP Newbie

Bluehost is among our best web hosts. Sign up with bluehost here

This is a bluehost question posted by ziltmilt on 22 November 2008

I’m trying to teach myself some basic stuff w/ PHP and interacting w/ MySQL. I really like the syntax and the neat features that come with PHP.

But, i’m trying to do something dead easy, and I’m getting nowhere. I’m trying to do a simple display of rows in a table (which only has 2 rows). The error I’m getting says that I’m trying to call a member function on a non-object, and it’s flagging the line where I’m using query() on a $db variable that I thought was connecting to my dbase.

I’m getting tripped up on which version of PHP and mySQL. I think the book I’m referencing is a few years old because it mentions using PEAR for db connections. Is that true, or should I instead be using mySQLi ? Neither is working for me.

Here’s the code I’ve been fiddling with.

You can read more about bluehost in detail or sign up now with bluehost web hosting

This entry was posted in Bluehost Host Bookmark this post and come back later for the best web hosting coupons.

This web hosting blog is proudly hosted with reliable Hostgator webhosting for only one cents through this hostgator coupon. If you're new here, you may want to subscribe to this web hosting RSS feed

-->