Home » Open Source » Programming Interfaces » Drop Down Boxes
Drop Down Boxes [message #398856] Sat, 18 April 2009 09:48
Messages: 1
Registered: April 2009
Junior Member
Hello i am novice when it comes to php and i have been trying to create a drop down box where data from my oracle data base is populated into that box.

Here is my code, i am able to get the drop down box but there are no values in the box

   $c = oci_connect('hr', 'hr')
        or die('Could not connect to Oracle server');

    $stmt = oci_parse($c, 'SELECT flight_number FROM flight_schedules');
   oci_execute($stmt, OCI_DEFAULT);
    <form action="test2.php" method="post">
       <select name="flight_number">
            <option value="0"></option>
          while (oci_fetch($stmt)) {
               printf('<option value="$stmt">%1$s</option>'
                    , oci_result($stmt, 'flight_number'));
Previous Topic: OCILOGON
Next Topic: Call a php, give values with method=GET
Goto Forum:

Current Time: Thu Mar 23 06:02:26 CDT 2023