$maximumPoints = 100;
if ( is_user_logged_in() ) {
if($twitterHandle!=""){
$hasCompletedTwitterHandle = 10;
}
if($linkedinHandle!=""){
$hasCompletedLinkedinHandle = 10;
}
if($googleplusHandle!=""){
$hasCompletedGoogleplusHandle = 10;
}
if($website_url!=""){
$hasCompletedWebsite_url = 10;
}
$percentage = ($hasCompletedTwitterHandle+$hasCompletedLinkedinHandle+$hasCompletedGoogleplusHandle+$hasCompletedWebsite_url)*$maximumPoints/100;
echo "Your percentage of profile completenes is".$percentage."%";
echo "<div style='width:100px; background-color:white; height:30px; border:1px solid #000;'>
<div style='width:".$percentage."px; background-color:red; height:30px;'></div></div>";
}
i have did this code now the progress bar is coming. i have an issue with this code, if a user is logged in he can see the other users profile progress bar. i do not need this, how can i restrict that, if a user is logged in that user want to see his progress bar only