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

  • Home
  • SEARCH
  • 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 7863511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:30:14+00:00 2026-06-02T23:30:14+00:00

so when i send the form with with the first option ‘public’ selected. the

  • 0

so when i send the form with with the first option ‘public’ selected. the data is inserted. but when i try submitting the form with the other option selected, the ones in the for each loop. the data no longer is sent. i have inspected the elements. and they are outputting all of the correct values. and they are displaying properly. why arent they inserting into the db? when i click submit nothing happens. but when i click submit for the first option, it works fine?

<form method='POST' action='add.php'>

<select>    
        <option name="user_page_id" value="<?php echo $_SESSION['user_id']; ?>">Public</option>

        <?php
                    $dis=show_groups_select_list($_SESSION['user_id']);
                    foreach($dis as $key=>$list){

                        echo '<option name="user_page_id" value="'.$list['id'].'">'.$list['username'].'</option>';
                    }
        ?>
</select>
</form>
  • 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-06-02T23:30:15+00:00Added an answer on June 2, 2026 at 11:30 pm

    You need to put the name attribute on the select tag, not the option tag.

    <select name="user_page_id">
        <?php foreach ($dis as $key => $list): ?>
            <option value="...">...</option>
        <?php endforeach; ?>
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I send form data using php in colorbox(lightbox) ifarme method. so i close auto
If you use POST to send FORM data to a PHP page, are the
I want to send the form data to server-side. I have two ways: Normal
I want to emulate a HTTP POST using application/x-www-form-urlencoded encoding to send a option
I'm trying to send form fields and file to a web service using php
I am getting a FaultEvent when trying to send form fields through HTTPService that
whenever i send a form hidden field to paypal with an email as a
I want to send the form after clicking on the label next to checkbox.
I'm trying to send a form with mootools and depending on the response from
i have a code to send a Form Post with login credentials to a

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.