Search found 3 matches

by goodrichdesigns
Wed Apr 02, 2008 1:34 pm
Forum: Databases
Topic: Need help printing an image URL from a MySQL database
Replies: 5
Views: 462

Re: Need help printing an image URL from a MySQL database

I've been working with this piece of code for over a week! I've been wrestling with it for over four hours today. Here is another attempt I've made: <?php $query = $db->execute("select `id`, `username`, `avatar` from `players` ?"); if ($player->avatar == 0) { echo "No avatar"; } ...
by goodrichdesigns
Wed Apr 02, 2008 10:45 am
Forum: Databases
Topic: Need help printing an image URL from a MySQL database
Replies: 5
Views: 462

Re: Need help printing an image URL from a MySQL database

I think the object notation is the correct one, but now how do I print an image as an 'else' statement in object notation form? (Sorry I'm very new to PHP/MySQL)
by goodrichdesigns
Wed Apr 02, 2008 10:26 am
Forum: Databases
Topic: Need help printing an image URL from a MySQL database
Replies: 5
Views: 462

Need help printing an image URL from a MySQL database

Hi all, I'm still struggling with If/Else PHP script. It's calling values from a MySQL database. It's for an assignment which is due in on Tuesday, can anyone please help? :? <?PHP if ($player->avatar == 0) echo "No avatar"; else print'<img src="'.$player['avatar'] .'" alt="...