Gregg Posted September 4, 2006 Author Share Posted September 4, 2006 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/datingsite/viewprofile.php on line 154The 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! Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 Lord knows what i was thinking about posting that. Apologies.This one works:[code]echo "<img src='". $images. "'/>";[/code] Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 4, 2006 Author Share Posted September 4, 2006 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 ifecho "<img src='". $images. "'/>"; ?>[/code]Maby some one could helpme prefect this part so its simple and works :) Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 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 ifecho "<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 ifecho "<img src='". $images. "'/>";[/code] Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 4, 2006 Author Share Posted September 4, 2006 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. Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 edit to match this, note the ' and ' around premium -> if($row1['premium'] == 'Y') Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 4, 2006 Author Share Posted September 4, 2006 ......Still ony shows the free image.. Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 4, 2006 Author Share Posted September 4, 2006 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 ifecho "<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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.