I am trying to come up with a way to handle Friend-Requests.
The idea I currently have would look like this…
PROCESS FRIEND-REQUESTS...
User1
<user1's photo> _ Accept _ Decline
User2
<user2's photo> _ Accept _ Decline
User3
<user3's photo> _ Accept _ Decline
User4
<user4's photo> _ Accept _ Decline
User5
<user5's photo> _ Accept _ Decline
---------------------- ------------
| PROCESS REQUESTS | | CANCEL |
---------------------- ------------
Questions:
1.) Is there a better or easier way to accomplish the same thing?
2.) Is it possible to have a series of Accept/Decline Radio Button “pairs” on several rows in a Form?
3.) Is it possible to make it so when the user clicks “Process Requests” that I could run an UPDATE query on each record in my “Friend” table (i.e. one Friend per record)
Thanks,
Debbie
DoubleDee:
I am trying to come up with a way to handle Friend-Requests.
The idea I currently have would look like this…
PROCESS FRIEND-REQUESTS...
User1
<user1's photo> _ Accept _ Decline
User2
<user2's photo> _ Accept _ Decline
User3
<user3's photo> _ Accept _ Decline
User4
<user4's photo> _ Accept _ Decline
User5
<user5's photo> _ Accept _ Decline
---------------------- ------------
| PROCESS REQUESTS | | CANCEL |
---------------------- ------------
Questions:
1.) Is there a better or easier way to accomplish the same thing?
2.) Is it possible to have a series of Accept/Decline Radio Button “pairs” on several rows in a Form?
3.) Is it possible to make it so when the user clicks “Process Requests” that I could run an UPDATE query on each record in my “Friend” table (i.e. one Friend per record)
Thanks,
Debbie
This is just off the top of my head, but:
Give each of the inputs an name. This is would be something like name=“request[$id] ” where $id would be the database unique id for that request.
Then you could process this in php by getting all of the ids (str_replace the “request-”) and use the “IN” parameter of mysql.
1: Looks good to me.
2: Yes.
3: Yes, but try wrapping your head around this: You should be able do all of the updating in 2 query executions, regardless of how many friends were accepted/declined.