Hello DaniWeb users!


Thank you for your time and interest in helping me out:

I have a real quick question:
I have a combobox:

<select name="bMinute"  style="background-color:#000000; color:#FFFFFF"onChange="document.myform.formVar.value=this.value">
            <option value="zero" selected>0</option>
            <option value="ten">10</option>
            <option value="twenty">20</option>
            <option value="thirty">30</option>
            <option value="forty">40</option>
            <option value="fifty">50</option>
        </select>

How do I load the value chosen by the users to $bMinute? I ultimately want to manipulate the var like any other var.

This is HTML in a PHP page.


Thank you in advance for taking your time and reading this

Hi.

You submit the form, and then you can access it from $_POST['bMinute'] .

Like:

<?php
if(isset($_POST['bMinute'])) {
  $bMinute = $_POST['bMinute'];

  // etc...
}
?>
<form action="?" method="post">
  <select name="bMinute">
    <option value="10">10</option>
    <option value="20">20</option>
    <!-- etc... -->
  </select>
</form>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.