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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:10:15+00:00 2026-06-14T04:10:15+00:00

i have a select box with these values: <form action=ampcontrols.php method=post name=amp> <select name=amp>

  • 0

i have a select box with these values:

<form action="ampcontrols.php" method="post" name="amp">
<select name="amp">
<option value="Fender '57 Deluxe","103">Fender '57 Deluxe</option>
<option value="Fender '59 Bassman","100">Fender '59 Bassman</option>
<option value="Fender '57 Champ","124">Fender '57 Champ</option>
<option value="Fender '65 Deluxe Reverb","83">Fender '65 Deluxe Reverb</option>
<option value="Fender '65 Princeton","106">Fender '65 Princeton</option>
<option value="Fender '65 Twin Reverb","117">Fender '65 Twin Reverb</option>
<option value="Fender Super-Sonic(Burn)","114">Fender Super-Sonic(Burn)</option>
<option value="British '60s","97">British '60s</option>
<option value="British '70s","121">British '70s</option>
<option value="British '80s","94">British '80s</option>
<option value="American '90","93">American '90s</option>
<option value="Metal 2000","109">Metal 2000</option>
</select>
<input name="submit" type="submit" value="Submit" />
</form>

I would like to be able to get 2 values and use them independantly. This is a single select box not multiple.
I can echo the selected name ie Fender ’57 Deluxe for an HTML tag no problem, but also need to pass it’s corresponding number to be inserted into an xml file seperately. i.e. Select Fender ’57 Deluxe as heading and 103 as id for xml.
I’ve tried with MySQL, XML but can only pass one value at a time!! I’m probably missing something simple.
Cheers

  • 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-14T04:10:16+00:00Added an answer on June 14, 2026 at 4:10 am

    Your HTML is not valid.

    To put multiple values on a single option you can use an array or an object

    Example of using an array

    <select name="amp">
        <option value='["Fender &apos;57 Deluxe","103"]'>Fender '57 Deluxe</option>
    </select>
    

    PHP Code

    <?php
    $amp = json_decode($_POST['amp']);
    $amp[0] // Fender '57
    $amp[1] // 103
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of currency values in a form select box (i.e. &pound;2,500
Let's say we have this code: <form action='' method='POST' enctype='multipart/form-data'> <input type='file' name='userFile'><br> <input
I have a select box on a page that does a post with jQuery
I have a select box that needs to submit it's value to a server
I have a select box with values automatically assigned and need to convert the
I have a select box on a form, which carries an incremental rel attribute.
I have a form with a select box where the user can select pre-existing
I am trying to do select box, where after select some option value will
I have a empty select box on a form. <select id='essentialDocs[]' ></select> through some
I Have a select box, on selectinga value in it I have to display

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.