Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7399863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:06:58+00:00 2026-05-29T04:06:58+00:00

I am developing a website wherein users are able to add friends. Here, I’m

  • 0

I am developing a website wherein users are able to add friends. Here, I’m using a simple SELECT statement to show which users are currently pending to be a friend. Here’s what I have so far:

while ($row = mysql_fetch_array($result))
{
<tr>
    <td><img src="<?=$photo;?>" /></td>
    <td><?=$realname;?></td>
    <td><?=$userid;?></td>
    <td><?=$username;?></td>
    <td>
        <select name="action">
            <option value="skip">Skip (no action)</option>
            <option value="accept">Accept</option>
            <option value="deny">Deny</option>
        </select>
        <input type="hidden" name="uid" value="<?=$userid;?>" />
    </td>
</tr>
}

Now, I’m not so sure about the select part. It’s easy to process if I will only select options for one user but how should I go about it so that when I select different options for two different users, I’d still be able to separate the results? Because right now, what it’s giving me is uid=1&action=accept&uid=2&action=deny. I’m thinking of changing the select name from action to action[] but I may be wrong. Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:06:59+00:00Added an answer on May 29, 2026 at 4:06 am

    You can use the uid as the key for your action. For example:

    <select name="action[<?php echo $userid; ?>]">
        <option value="skip">Skip (no action)</option>
        <option value="accept">Accept</option>
        <option value="deny">Deny</option>
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a website which will allow users to pay via Paypal. Paypal
I'm trying my luck here. I am currently developing a website wherein people should
I'm developing a website to deploy my android applications. Users can select multiple android
I am developing a website using CodeIgniter and PHP. Some of my friends suggest
I’m developing a website which allows users to join with GFC (Google Friend Connect).
I am developing a website using ASP.NET 4.0. I want to fetch & show
I'm developing a website. I'm using a single-page web-app style, so all of the
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm
I am developing a website using SQL Server Express on my development machine. My
I'm developing a website (using asp.net by the way) and I'm having a problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.