View Full Version : php friend accept reject code
thindrakhya
06-19-2007, 12:58 PM
hi friends
I am creating a website in which students create groups
and owner students can accept or reject the invitation of other studenst to join the group like moderators in forums
and owner can send invitaion to other students to join it
Do nay one have idea how to accomplish this
mlseim
06-19-2007, 02:56 PM
This is really complex because it will involve PHP/MySQL.
We would need to know what you have created so far, and did you
use an existing script for "memberships" or "forums"? You might be
best off looking for a free forum script that you can customize for your
own use. It will have all of the member registration parts, admin permissions,
and the accept/reject (moderating posts and submissions).
thindrakhya
06-19-2007, 05:28 PM
I am using mysql/php
So far i have created homepage in which students can register and start groups
Now i want to perfrom some action only on users in the particular group
But owner should have the control which users should be in the group
I tried searching the forums script but they are too vast
i could not find the code of accepting or rejecting the user
I just want to know the logic Rest i can code
Its better to code all ur work , Its very difficult to understand the ready made scripts especially if they are too long
Fumigator
06-19-2007, 05:48 PM
One thing you may look into is this: "." It's used to end a sentence. Also these: "," help to construct sentences in ways that make it easier for us to understand your post.
:thumbsup:
mlseim
06-19-2007, 05:51 PM
OK ... so that's good you're using MySQL and learning by doing it
yourself ... I'm guessing you have tables set-up for each person,
name, id, email, username, password, etc.
So in your table you have a field that defines the group number,
so everyone in the same group has the same number ... then, there
is also a field for each member that is a code like 0,1,2 etc.
Perhaps everyone is a code 0 except for the group owner (admin),
maybe they are a code 9.
So with your script, once you read all of the group, you can determine if
the person logged in is a level 9 or not. By using a level system, you might
give no permissions to level 0, but added features to levels 1,2,3 etc.
Level 9 of course would be the only person who could control everyone
in that group.
aedrin
06-19-2007, 07:33 PM
This is really complex because it will involve PHP/MySQL.
I think what you mean is that it will be harder for a beginning programmer. It's not a complex feature. Don't want to make it seem near impossible for the pers on in question. ;)
mlseim
06-19-2007, 08:46 PM
Yes, I mean it's harder for the beginner (not knowing their level).
thindrakhya
06-20-2007, 02:56 AM
Thats right mlseim , i am also thinking on the same grounds.
But my questions is how to make table or cloumn or databse feature for accepting or rejecting.
E.g the table group-users conatin the foll fields,
owner users group accept_flag
1111 2222 A 0
Now the default value of accept_flag will be 0,
when the user send request to join the group then the owner will receive the message the if he accepts the mesage the value of flag will be updated to 1 and that person will be joined.
But i am not sure whether a new table has to be built which contains the message sent or the the sender.
I have only the vague idea. Does anyone has the proper solutions who can tell what exactly should be tha tables. so that in future if need to make somee additions i don'nt have to redesign the database.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.