Hello There, Guest! RegisterLogin with Facebook
Login with Facebook
 >>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE >>> Anna University Study Materials for all Departments >>> Anna University Question Papers : April May June 2015 Question Papers | Nov Dec 2014 and Jan 2015 Question Papers

## Register or Login to Submit Study Materials , Shoutbox and also to access Many Features !!

Share your Study Materials with us : Click Here

 PHP I NEED HELP N ULOKI SCRIPT Hanani Hanomi V+ New Member 12-12-2014, 07:23 PM HOW TO MAKE ADD FREND FUNCTION?? SLEDY CREATE IT AND WORK FINE .. I JUST GOT SOME PROBLEM IN PROFILE ... TO SHOW ADD AS BUDDY DELETE AS BUDDY REQUEST SENT.. I DONT KNOW HOW TO MSKE IT ... .. THIS CODE NOT WORK IN PROFILE FUNCTION PHP Code: `function budres(\$u, \$w){//3 = can't bud//2 = already buds//1 = request pended//0 = can budif(\$u==\$w){return 3;}if(arebuds(\$u, \$w)){return 2;}\$req = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE ((user='".\$u."' AND who='".\$w."') OR (user='".\$w."' AND who='".\$u."')) AND agreed='0'"));if(\$req[0]>0){return 1;}\$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE (user='".\$w."' OR who='".\$w."') AND agreed='1'"));if(\$notb[0]>=300){return 3;}\$notb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE (user='".\$u."' OR who='".\$u."') AND agreed='1'"));if(\$notb[0]>=300){return 3;}return 0;} ` CALLED IN PROFILE.PHP PHP Code: `if(budres(\$u, \$w)==0){echo "Add as Friend";}else if(budres(\$u, \$w)==1){echo "Request sent";}else if(budres(\$u, \$w)==2){echo "Delete Friend";} ` any other way?? pliss help me « Next Oldest | « Next Newest

Subscribe

Recommend on Google