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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:14:07+00:00 2026-05-30T16:14:07+00:00

I am encountering a strange problem when trying to create two dropdowns where the

  • 0

I am encountering a strange problem when trying to create two dropdowns where the values are loaded from two different arrays. The problem is I can see only one dropdown and at the end of the list I see the label of the next dropdown, finally it is also not showing any submit button which I have created after the dropdown lists.

Let me make it clear with some code and screenshots, so that one can have an idea:

if($output_form == 1){
    ?>

        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> 
        <label>ID</label>
            <input type="text" name="ID" /><br /><br/>
        <label>Name</label>
            <input type="text" name="name" /><br /><br/>
        <label>Upload1:</label>
            <input type="file"  name="upload1" /><br />  
        <label>Upload2:</label>
            <input type="file"  name="upload2" /><br />               

        <label>Catalogue</label>
        <select name="cataloguepdfs" />
        <?php        
            foreach ($catalogueArray as $cataloguePDFName) {    
                echo '<option value="'. $cataloguePDFName . '">' . $cataloguePDFName . '<option />';                     
            }                                       
        ?>  
        <label>Template</label>
        <select name="templatepdfs" />
        <?php
            foreach ($templateArray as $templatePDFName) {    
                echo '<option value="'. $templatePDFName . '">' . $templatePDFName . '<option />';                     
            }
        ?>       
        <input type="submit" name="submit" value="Submit">
    </body>
</html>
<?php
    }
?>   

Here is the screenshot for the above code. Please note that the rest of my code is working good, fetching the .pdf file names from the respective arrays. Please note that my pdfs are named 1.pdf, 2.pdf and so on

Image 1

On the other hand if I move the template dropdown list above the catalogue dropdown list it is the other way round with ‘Catalogue’ as the end element in the dropdown list.

If there is only dropdown list everything works fine including the presence of the submit button.

Is there a way how I can display both the dropdowns after populating them from respective arrays. Is there some problem with my code. Any help would be appreciated.

Thanks

  • 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-30T16:14:09+00:00Added an answer on May 30, 2026 at 4:14 pm

    You need to close select after options

    <select name="cataloguepdfs">
            <?php        
                foreach ($catalogueArray as $cataloguePDFName) {    
                    echo '<option value="'. $cataloguePDFName . '">' . $cataloguePDFName . '<option />';                     
                }                                       
            ?>  
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am encountering a problem with string formatting while trying to get only the
I am encountering a strange problem. I am trying to generate a matrix with
I am encountering a strange problem when attempting to execute a DELETE query agains
I am encountering a strange javascript regex problem on Firefox 3.6 and Chrome 6
I've been encountering some strange behavior when trying to find a key inside a
I´m encountering this problem trying to mock some objects that receive complex lambda expressions
I'm encountering a problem generating my client and server code from wsdl. I've been
I'm encountering a very strange problem: my delete actions in rails don't work anymore.
I'm encountering a very strange problem using g++ 4.1.2. I have a very basic
As the title boasts, I'm encountering a rather strange problem with Firefox where it's

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.