Jump to content

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


Gregg

Recommended Posts

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.

[color=red]echo "<img src='. $images. "'/>";[/color] Yours. "LINE 154"
[color=blue]echo[/color] [color=red]'<img src=\"[/color][color=blue].$images.[/color][color=red]\"/>'[/color][color=black];[/color] The old code!

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 "[color=red]<?[/color] [color=blue]echo[/color] [color=red]$row["[/color]premium[color=red]"]?>[/color]" 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..
[code]<?
  echo $row["premium"]
if($row1[premium] == 'Y'){
        $images="Images/SilverMember.gif";
} else {
$images="Images/FreeMember.gif";
}//end if

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

Maby some one could helpme prefect this part so its simple and  works :)
um, we're we supposed to know what's going on in the 'head'?

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

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

To this:
[code]<?
// 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. "'/>";[/code]
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..

[color=blue]
THANKS TO EVERY OJNE WHO HELP ME I APREACIAT IT VERY MUCH![/color] ::)

[img]http://darkwaterstudio.net/datingsite/TestComplete.gif[/img]

[quote]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 :)[/quote]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.