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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:17:43+00:00 2026-05-24T17:17:43+00:00

I wanted to use php to get the value of a combo box, and

  • 0

I wanted to use php to get the value of a combo box, and I am using post method…
can anyone tell me how.

<html>
    <head>
        <title>Virtual Library</title>
        <link href="css/login.css" rel="stylesheet"/>
        <link href="css/style.css" rel="stylesheet"/>
        <script type="text/javascript" src="scripts/ajax_search.js"></script>
    </head>
    <body>
        <div id="wrapper">
            <div id="header" align="center">
                <ul align="center">
                    <li><a href="index.php"><span>Home</span></a></li>
                    <li><a href="news.html"><span>Top 100 Downloads</span></a></li>
                    <li><a href="upload.php"><span>Upload</span></a></li>
                    <?php if(isset($_SESSION['login_user']))
                    { 
                        $uname = $_SESSION['login_user'];
                        echo "<li><a href='profile.php'><span>$uname</span></a></li>";
                        echo "<li><a href='logout.php'><span>LogOut</span></a></li>";
                    }
                    else{
                            echo "<li><a href='login.php'><span>Member Login</span></a></li>";
                            echo "<li><a href='register.php'><span>Register</span></a></li>";
                        }
                    ?>
                    <li><a href="downloads.html"><span>RSS <img src="images/rss.gif" id="rss"></span></a></li>
                </ul>
            </div>
            <?php if(isset($_SESSION['login_user']))
                    { 
                            echo "<div class='frmdiv'>
                                <form action='upload_file.php' method='post' enctype='multipart/form-data'> 
                                <table width='38%' border='0' align='center' cellpadding='0' cellspacing='0'>
                                <tr> 
                                    <td colspan='2'><div align='center'><font size='2' face='verdana'>Upload File</font></div></td>
                                </tr>
                                <tr> 
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                    <td colspan='2'><hr></td>
                                </tr>
                                <tr> 
                                    <td height='26'><font size='2' face='verdana'>FileName</font></td>
                                    <td><font size='2' face='verdana'> 
                                    <input type='file' name='file' ></font>
                                    </td>
                                </tr>
                                <tr> 
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                    <td></td>
                                    <td><select name='media_type' >
                                    <option value='' selected>Select a media type...</option>
                                    <option value='pdf'>PDF</option>
                                    <option value='chm'>CHM</option>
                                    <option value='epub'>EPUB</option>
                                    <option value='html'>HTML</option>
                                    <option value='djvu'>DJVU</option>
                                    </select></td>
                                </tr>
                                <tr> 
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                    <td>&nbsp;</td>
                                    <td><font size='2' face='verdana'> 
                                    <input type='submit' name='Submit' value='Upload'></font>
                                    </td>
                                </tr>
                                <tr> 
                                    <td colspan='2'><hr></td>
                                </tr>
                                <tr> 
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                </table>
                                </form>
                                <div align='center'>";
                    }
                    else{
                            echo "<script type='text/javascript'>";
                            echo "alert('You Must Be Logged In To Upload');";
                            echo "location='login.php'";
                            echo "</script";

                        }
            ?>
        </div>
    </body>
</html>

this is the combo box.

  • 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-24T17:17:44+00:00Added an answer on May 24, 2026 at 5:17 pm

    Try:

    if(isset($_POST['media_type']){
       $value = $_POST['media_type'];
    }
    

    Update: Since that doesn’t work for you, check to see if you are getting any post variables:

    foreach ($_POST as $var => $value) { 
        echo "$var = $value<br>n"; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get dns records, so i wanted to make use of php's
I wanted to use PHP Simple HTML DOM Parser to grab the Google Apps
I know I could use PHP to do this, but wanted to find out
I wanted to use groovy for a little ftp script and found this post
I wanted to create a web chat. It was suggested that i use Php
Possible Duplicate: Deflate command line tool Yes, I know I can use PHP itself
I wanted to get the settings of the current installed PHP on my server.
I originally had a submit button like this <form action=<?php $self ?> method=post >
I wanted to use PHP do do a little thing, but I needed to
I wanted to use the Twitter API to get the friends status list from

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.