General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 12th, 2003, 09:54 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 6
displaying image by refering to db

Hi guys,

I am having a prob with displaying an image by refering to the db.. here is the case..

i have a template base web page and i used to store all the info in mysql and let the php code to display the output by refering to the db..

for instance, to display the contents of the center frame, i use echo $row['body']; <-- something like that..

now i have stored an image url in my db... e.g: dsa.jpg and try to display it in the center frame.. it works okay in other frames (drop down menu selection of image) except the body frame (text field used to insert the image location in the db).

In the body frame, it not only not able to diplay the image correctly,, it does not even show the square box with a red cross inside to indicate there is a image there.. in other words, it seems like it dun really recognize my <img src> code and skipped that part of html code.

when i refresh and view my html code, my code became
<img src=\\\"dsa.jpg\\\" width=\\\"32\\\" height=\\\"32\\\" border=\\\"0\\\">

i am wondering why it has so many slashes added in automatically and why the php seem to skip this part of the html code.. is it the php.ini configuration having prob or what..

p.s: for your guys info, all of these do work in the old server but now it does not seem to work anymore in the new server (hosting).

hope u guys can understand what i am trying to say.

please advise. TQ.

Reply With Quote
  #2  
Old October 13th, 2003, 06:46 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Try wrapping stripslashes() around the image output.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > displaying image by refering to db


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway