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 739719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:25:59+00:00 2026-05-14T08:25:59+00:00

I have a form that has a field pulled from the database as a

  • 0

I have a form that has a field pulled from the database as a dropdown. I need to get the text selected in the dropdown but I don’t know in advance what the field ID will be.

This is basically just a form that has already been generated. I don’t need to pull anything from the database, it’s already on this page. All I need to do is get the form information and email it, no writing to the database.

I know how to do the _Request for the other fields based on the ID but I’m not sure how to do this one. The ID changes. It can be ID=1, ID-2, etc.

I need to do something like: _REQUEST form element where ID is LIKE “ID[*]” or something similar.

Any suggestions or links to tutorials?

Here are a couple samples of what the dropdown renders on the page:

<div class="wrapperAttribsOptions">
<h4 class="optionName back"><label class="attribsSelect" for="attrib-  1">Model</label></h4>
<div class="back">
<select name="id[1]" id="attrib-1">
    <option value="45">VC3-4C</option>
    <option value="1">VC3-4PG</option>
    <option value="3">VC3-4SG</option>

<div class="wrapperAttribsOptions">
<h4 class="optionName back"><label class="attribsSelect" for="attrib-14">SPK   Model</label></h4>

<div class="back">
<select name="id[14]" id="attrib-14">
    <option value="43">SPK-4</option>
    <option value="44">SPK-8</option>
</select>

TIA

  • 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-14T08:26:00+00:00Added an answer on May 14, 2026 at 8:26 am

    The brackets [] mean that PHP will create an array variable with the posted values. So you should have $_REQUEST['id'] as an array. There should be a value keyed by the number in the form ($_REQUEST['id'][1] in your first example, $_REQUEST['id'][14] in your second).

    If there will just be one value (you don’t say what you’re trying to do with these values) then you can just shift it off the array.

    $value = array_shift($_REQUEST['id']);
    

    If there will be multiple values, you can loop through them:

    foreach($_REQUEST['id'] as $number => $value) { ... }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 383k
  • Answers 383k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That code will break with most collections - other than… May 14, 2026 at 10:57 pm
  • Editorial Team
    Editorial Team added an answer DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); df.parse(datearray[i]).after(new Date()) May 14, 2026 at 10:57 pm
  • Editorial Team
    Editorial Team added an answer Use a table valued function like this, CREATE FUNCTION Splitfn(@String… May 14, 2026 at 10:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.