Topic: I would like to add an image based on the users style

I am trying to add an image in my blog.php file such as:

<img src="img/'.$pun_user['style'].'/icon_small.gif" alt="" />

I tried adding:
global $pun_user;

but this does nothing. What would I need to add to get it to work?

Thanks
Bingiman

2

Re: I would like to add an image based on the users style

You have a connection to the database?

I think global $pun_user; only works in functions.

3 (edited by bingiman 2008-01-15 22:37)

Re: I would like to add an image based on the users style

Yes, it is the user blogs mod I am using..There is always a connection to the DB on my local site.

Re: I would like to add an image based on the users style

View the source and what do you see?

Simple thing to look over is if your using it in html then you would need to use

<img src="img/<?php echo $pun_user['style'] ?>/icon_small.gif" alt="" />

Re: I would like to add an image based on the users style

Thank you very much. Worked like a charm. smile