Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Displaying image using info from database

images php coding issues or problems here.

Moderators: macek, egami, gesf

Displaying image using info from database

Postby blackthumb » Sat Jul 07, 2012 1:43 pm

I have set up links in the form of text in fields from my database. I then open the database and enter the text into vairiables. I then use the variables as follows to display the images stored elsewhere:
echo "<img src='$pic'>";
I have tried other ways of displaying too, but nothing works. I just display a box with a cross. It works when i actually type the link in, but not using the variable. I know the text is stored in the variable. What am I doing wrong?
Many thanks
blackthumb
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Jul 07, 2012 1:37 pm

Re: Displaying image using info from database

Postby Nullsig » Wed Jul 11, 2012 7:41 am

Please show the full script that you are using.
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
 
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron