sending two ids through a select box
<pre><code>if(isset($_POST['submit'])) {
    $doc = new Doc_Schedule();
    $doc-&gt;doctor = $_POST['doctor'];
    $doc-&gt;department = $_POST['dpt'];
    $doc-&gt;sheduledate = $_POST['date'];
    $doc-&gt;scheduletime = $_POST['time'];
    if( $doc-&gt;create() ) {
        $message = "Doctors Information Saved Successfully";
    } else {
        $message = join("&lt;br/&gt;",$doc-&gt;errors);
    }
}
</code></pre>

<hr>

<pre><code>&lt;select name="doctor" id="Deptmentselectbox" class="AllSelectBoxes"&gt;
    &lt;option value=""&gt;Select Doctor&lt;/option&gt;
&lt;?php
    $sql = "SELECT `fullname`,`depid`,`docid` FROM `doctors` ORDER BY fullname ASC";
    $result = $database-&gt;query($sql) or die('cannot connect to the database');
    while( $row = mysql_fetch_array($result) ) {
       echo"&lt;option value= ".$row['docid']."&gt;".$row['fullname']."&lt;/option&gt;";
    }
?&gt;
&lt;/select&gt;
</code></pre>

<p>I have a select box which will show me doctors in a table. when i click a certain doctor i want to send both <code>doctors.docid</code> and <code>doctors.deptid(department id)</code> to a class for further processing.</p>

<p>I am having trouble finding a solution other dan creating a new select box for department id.</p>
