Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with picture

Member
 
Join Date: Sep 2006
Posts: 42
#1: Sep 9 '08
Hey everyone.

I have a strange problem with PHP site. This only happens in IE 6.
So, when user logs in there is a placeholder for user's own picture. Also there is a form where this picture can be loaded. The problem is that the picture won't show in main page, but shows in the loading form.

The main page works with following code:
[HTML]
<div style="position:absolute;left:0;top:30px;height:13 0px;width:130px;background-image:url('afbeeldingen/[[profielafbeelding]]');background-position:center;" id="profielafbeelding"></div>
<div style="position:absolute;left:0;top:0;height:200px ;width:188px"><img src="[[url]]images/photoframe.png" width="188" height="200" /></div> [/HTML]

Which is assigned in PHP with following code:

[PHP]$index->assign("profielafbeelding",$user->afbeelding);[/PHP]

And eventually with following code the picture is fetched from db:

[PHP]
function get_afbeelding() {
$this->classes();
$this->afbeelding = false;
$this->SQL->query("select * from tblAfbeeldingen where uid='".$this->uid."'");
if (sizeof($tmp = $this->SQL->result(true,true))) $this->afbeelding = $tmp['afbeelding'];
}

[/PHP]

The form works with following code:

[HTML]<p align="center" class="tekst"><img class="profile" src="afbeeldingen/[[afbeelding]]" style="display:[[img]]" id="afbeelding"/>[/HTML]

Assigning:

[PHP]
$page->assign("afbeelding",$user->afbeelding); [/PHP]

And the database fetching is the same.

What could cause this not to work in IE6? Any suggestions?

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,752
#2: Sep 9 '08

re: Problem with picture


Hi.

My guess would be that IE doesn't support some (any) of the HTML/CSS you are using. (It has a nasty habit of doing that)

To be honest, I wouldn't bother with it. If people insist on using IE6 (or IE in general) they deserve to see broken pages...

But, I'm still going to move this over to the HTML/CSS forum. Maybe somebody there can spot the problem.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#3: Sep 9 '08

re: Problem with picture


Heya, Zamuel.

What's the final HTML look like? Are those [[var]] tokens getting replaced by anything, or are they remaining in the end result?
Member
 
Join Date: Sep 2006
Posts: 42
#4: Sep 16 '08

re: Problem with picture


Hello, I have been busy for a while. Yes, the problem was solved accidentally. I had some other pictures (PBGs) on the site and because of that I had to make a fix not to mess up the transparency. Fortunately this fixed also the problem with the main picture.

Thanks for everyone.
Member
 
Join Date: Sep 2006
Posts: 42
#5: Sep 16 '08

re: Problem with picture


I mean 'PNGs' on the last reply.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#6: Sep 16 '08

re: Problem with picture


Glad to hear you got it working! Thanks for posting your solution.

Good luck with your project, and if you run into any trouble, post back anytime (:
Reply