Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

New Anna University Nov / Dec 2016 Examination Important Questions
New Anna University (UG / PG) Nov/Dec 2016 and Jan 2017 Theory , Practical Exam Timetable
>>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE
>>> Anna University November/December 2015 Examination Question Papers
>>> 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 !!

Vidyarthiplus Shop :: Handwritten Premium Lecture Notes
Share your Study Materials with us
Share your Study Materials with us : Click Here

PHP I NEED HELP N ULOKI SCRIPT
#1


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 bud
if($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 
"<a href=\"$path?asp=profile&amp;w=$w&amp;do=1\">Add as Friend</a><br />";
}else if(
budres($u$w)==1){
echo 
"Request sent<br />";
}else if(
budres($u$w)==2){
echo 
"<a href=\"$path?asp=profile&amp;w=$w&amp;do=2\">Delete Friend</a><br />";



any other way??
pliss help me



Reply

Subscribe


Recommend on Google