Jump to content

How to replace string with name or image


rastaman46

Recommended Posts

that was just example

 

im need take user posts say user posted 500 post i need to put image next to hes nick name

 

somthing like

 

here my sql query go in this lane

 

if ($row['user_posted'] == 500)

{

$bestposter = 'here i need add image'

}

well i think this has to do alot with your database structure this is the code i think might work

 

<?php
$img1 = 1.jpg;
$img2 = 2.jpg;
//query a count of user_posted 
if($row['COUNT(user_posted)'] >= 100){
echo $img1;
}else {
echo $img2;
}

?>

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.