Jump to content

Archived

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

Gregg

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

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!

Share this post


Link to post
Share on other sites
Lord knows what i was thinking about posting that. Apologies.

This one works:

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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
edit to match this, note the ' and ' around premium -> if($row1['premium'] == 'Y')

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

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.