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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:06:34+00:00 2026-06-12T11:06:34+00:00

I have an upload form, for the first drop down, the category drop down,

  • 0

I have an upload form, for the first drop down, the category drop down, I want to echo another drop down list (book category) if the option value “book” is chosen

<form action="uploadproc1.php" method="post" enctype="multipart/form-data">

                     <p> <label for="category"><b>Category</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                 <select name="category" id="category">
                    <option value=""> -- select -- </option>
                    <option value="Accessories">Accessories</option>
                    <option value="Accommodation">Accommodation</option>
                    <option value="Books">Books</option>
                    <option value="Business">Business</option>
                    <option value="Clothing">Clothing</option>
                    <option value="Electronics">Electronics</option>
                    <option value="Furniture">Furniture</option>
                    <option value="Imagery">Imagery</option>
                    <option value="Multi">Multimedia</option>
                    <option value="Tickets">Tickets</option>

                   </select>
        </p>

        <?php IF (category selected==book?){
           echo '<p> <label for="bookcat"><b>Book Category</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>';
                echo '<select name="category" id="category">';
                echo '<option value=""> -- select -- </option>';
                   echo '<option value="Law">Law</option>';
                   echo '<option value="Business">Business</option>';
                    echo '<option value="Optom">Optom</option>';
                    echo '<option value="Engineering">Engineering</option>';
                    echo '<option value="Pharmacy">Pharmacy</option>';
                    echo '<option value="Sciences">Sciences</option>';
                    echo '<option value="Languages">Languages</option>';
                    echo '<option value="English">English</option>';
                    echo '<option value="Maths">Maths</option>';
                    echo '<option value="Other">Other</option>';


                   echo '</select>';
        echo '</p>';

        }

        ?>
  • 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-12T11:06:35+00:00Added an answer on June 12, 2026 at 11:06 am

    Add the second dropdown list, but hide it at the beginning:

    <p id="p_bookcat" style="display: none;">
      <label for="bookcat"><b>Book Category</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
      <select name="bookcat" id="bookcat>
        <option value=""> -- select -- </option>
        <option value="Law">Law</option>
        <option value="Business">Business</option>
        <option value="Optom">Optom</option>
        <option value="Engineering">Engineering</option>
        <option value="Pharmacy">Pharmacy</option>
        <option value="Sciences">Sciences</option>
        <option value="Languages">Languages</option>
        <option value="English">English</option>
        <option value="Maths">Maths</option>
        <option value="Other">Other</option>
      </select>
    </p>
    

    Then add the following jQuery code:

    <script type="text/javascript">
      $(document).ready(function () {
        $('#category').change(function() {
          if ($(this).val() == 'Books') {
            $('#p_bookcat').show();
          } else {
            $('#p_bookcat').hide();
          }
        });
      });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had another form to upload the details of 1 product which have multiple
I want to create a preview image before the actual form upload. I have
I have an upload form with plupload and a checkbox with boolean value after
i have a php image upload upload form and what i want to do
I have a form and I want to upload a file. here is my
I have an upload form with a file to be uploaded. The issue I
I have an upload form that takes a user about 30 min. to complete.
I am new to Jquery. I have an upload form that when something is
In my upload form I have a few select boxes. These are arranged in
I have an upload box... <form action=upload_file.php method=post enctype=multipart/form-data><BR> <label for=file>Filename:</label><BR> <input type=file name=file

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.