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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:00:45+00:00 2026-05-17T19:00:45+00:00

thank you all so very much for helping. It’s seemingly such an easy task,

  • 0

thank you all so very much for helping. It’s seemingly such an easy task, and I feel I just hit a brick wall and not knowing how to fix it.

I’ll try to explain what I am doing a bit more and hope it makes sense.

I used a database to populate my dropdown box, dropdown box is something like:

echo "<form action='process_form.php' method='post'>";
echo "Select an item<br />";
echo "<select name='item' id='item'>";
//database was connected and select query was executed succesfully. $result was the select query result.
while($row = mysql_fetch_array($result))
{
//each row contains more than one words, something like "dressmaker mannequin size 12"
echo "<option value=" . $row['style'] . ">" . $row['style']. "</option>" . "<br />";
}
...
...

Dropdown box was populated with correct data.

Then user selects an item from this drop down box, and clicks the submit button.

I need to know which item user has selected in order to calculate its shipping costs, but when I use $_POST['item'] to try to find out which item was selected, I get the first word “dressmaker”, the rests were missing!

Please help me to obtain the whole string of words.

Many many thanks in advance.

Sorry I am completely new to forums, and I don’t even know how to post or follow up with a question. If you guys can help me on this as well. At the moment, I am struggling to post my follow up questions … hope this will show up …

  • 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-17T19:00:46+00:00Added an answer on May 17, 2026 at 7:00 pm

    Hopefully, your MYSQL database has a primary key? If it does, set the value of each <option> to the primary key of the item.

    For example:

    SQL

    id  desc
    1   "dressmaker thing with mannequin"
    2   "dressmaker thing no mannequin"
    

    Form PHP

    echo "<option value='".$query['id']."'>".$query['desc']."</option>";
    

    When form is submitted, re-query the database for the desired description. You’ll be doing this re-query anyway to retrieve prices and such, yes?

    The reason this is happening is that spaces are discouraged in HTML attributes. You shouldn’t have an attribute like value='this attribute is spaced'.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, thank you very much in advance for any attempt at helping
First and foremost, thank you all for reading this and helping, I'm very grateful.
Hi all it's my first post in stack-overflow, So First, thank you very much
Thank you all for helping. Below this post I put the corrected version's of
Again thank you to all who spend a little of their time helping me
Thank you very much for the answer. The reason that makes me think about
Thank you very much in advance for the help. I'm trying to byte-compile my
First of all thanks in advance, this has been very frustrating and I'm hoping
All the ways I can think to do this seem very hackish. What is
First of all thank you for your time and sorry if some issues are

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.