Jump to content


Photo

Res diffrent image for table value "FIXED THANKS TO AndyB"


  • Please log in to reply
32 replies to this topic

#21 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 05:54 AM

Well i tryed it and it had no errors but the pic dident load..Same error pic "blank"
WTF?


#22 radar

radar
  • Members
  • PipPipPip
  • Advanced Member
  • 645 posts
  • LocationSLC

Posted 04 September 2006 - 05:58 AM

If you have msn messenger i can try and help you more..  you can get my msn from my post as "more on: Arrays, Queries and Loops" or something like that...

#23 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 12:30 PM

Well i tryed it and it had no errors but the pic dident load..Same error pic "blank"
WTF?


Look at the generated html code and post back the exact img src shown in the page for the 'missing' image.  This looks like a case of pointing on the wrong path or folders/images incorrectly-named.  As a matter of good practice, always name images and folders in lowercase exclusively (and without spaces).
Legend has it that reading the manual never killed anyone.
My site

#24 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 04:20 PM

yeah, the url is perfect ecept it says "images/photo.gif/" at the end ot it!
why the extra / after the image code?

#25 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 04:24 PM

echo '<img src=' .$images.'/>';

should be:

echo "<img src='. $images. "'/>";
Legend has it that reading the manual never killed anyone.
My site

#26 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 04:58 PM

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/datingsite/viewprofile.php on line 154

The code dident look wright eather.
usaly its red with blue sections and it turned all the php red lol.

echo "<img src='. $images. "'/>"; Yours. "LINE 154"
echo '<img src=\".$images.\"/>'; The old code!



#27 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 05:09 PM

Lord knows what i was thinking about posting that. Apologies.

This one works:

echo "<img src='". $images. "'/>";

Legend has it that reading the manual never killed anyone.
My site

#28 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 06:02 PM

Much better lol, but the image still wont show, i think its the call function..

Do i really need the "$sql1="select * from users where identity='$UsErCoOkIe'";
$res1=mysql_query($sql1,$db);
$res1=mysql_query($sql1,$db) or die("Error: ". mysql_error(). " with query ". $sql1); // display any problems"

cause its all ready called in the head of the page when it loaded all the other info!

When i place "<? echo $row["premium"]?>" it works perfict with out all the extra code..
The userid and every thing was called in the head, so i think making it more simple will do the trick..
<? 
							  echo $row["premium"]
	if($row1[premium] == 'Y'){
        $images="Images/SilverMember.gif";
	} else {
		$images="Images/FreeMember.gif";
}//end if

echo "<img src='". $images. "'/>";
							  ?>

Maby some one could helpme prefect this part so its simple and  works :)


#29 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 06:12 PM

um, we're we supposed to know what's going on in the 'head'?

Then change this:
<? 
        echo $row["premium"]
	if($row1[premium] == 'Y'){
        $images="Images/SilverMember.gif";
	} else {
		$images="Images/FreeMember.gif";
}//end if

echo "<img src='". $images. "'/>";

To this:
<? 
// echo $row["premium"]
if($row1[premium] == 'Y') {
    $images="images/SilverMember.gif"; // LOWERCASE folder name!
} else {
    $images="images/FreeMember.gif"; // // LOWERCASE folder name!
}//end if

echo "<img src='". $images. "'/>";

Legend has it that reading the manual never killed anyone.
My site

#30 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 06:23 PM

IT WORKES!!!!
But only shows the free image even knowing the user is paid?
At least we are getting some where lol..

Mamby i do need to echo the users id? so it pulls the correct info for that profile huh.

#31 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 06:30 PM

edit to match this, note the ' and ' around premium -> if($row1['premium'] == 'Y')
Legend has it that reading the manual never killed anyone.
My site

#32 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 06:35 PM

......
Still ony shows the free image..

#33 Gregg

Gregg
  • Members
  • PipPipPip
  • Advanced Member
  • 61 posts
  • LocationUSA

Posted 04 September 2006 - 06:41 PM

NEVER MIND I FIXED IT LOL.....
<?
// echo $row["premium"]
if($row['premium'] == 'Y') {
    $images="images/SilverMember.gif"; // LOWERCASE folder name!
} else {
    $images="images/FreeMember.gif"; // // LOWERCASE folder name!
}//end if

echo "<img src='". $images. "'/>";
?>

I removed the "1" after "row" cause it was all readY called in the head!
A SECOND TIME WAS CAUSING THE ERROR..


THANKS TO EVERY OJNE WHO HELP ME I APREACIAT IT VERY MUCH!
::)

Posted Image

It's very strange that i get stuck one something so simple, but yet i can design the entire CAM network just fine lol. I have allways been able to figure out the hard stuff and mess up the easy :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users