Droopy Foom Posted May 1, 2007 Share Posted May 1, 2007 can anyone help me here? trying to get a drop down box poulated from Oracle, which is actually working, but once a field is selected and submit button is hit im getting an error in displaying the results and i'm probably missing something really stupid but i can't see what it is. any feedback would be great! it seems to b a problem with my query/connection at the end. <body> <?php putenv("TNS_ADMIN=/u1/oracle/Products/shu10g/network/admin"); $conn = OCILogon("myusername","mypassword", "shu10g"); $query = "select ItemGroupID from ProjItemGroup"; $stmt = ociparse($conn, $query); ociexecute($stmt); ?> <ul class="navbar"> <li> <a href="index.html">Home Page</a> <li> <a href="product.php">Browse Products</a> <li> <a href="search.php">Search Products</a> <li> <a href="stafflogon.php">Staff Logon</a> </ul> <form action="search.php" method="post"> Item Name <select name="ItemGroupID"> <option> </option> <?php while (ocifetchinto($stmt, $row)) { print "<option>"; print $row[0]; print "</option>"; } ?> </select> <input type="Submit" name="Submit" value="Submit"> </form> <?php if ($_POST["ItemGroupID"]=="") { print "Please select a item type"; } else { $query = "select ItemGroupID, ItemGroupDesc from ProjItemGroup where ItemGroupID = "; $query = $query.$_POST['ItemGroupID']; $stmt = ociparse($conn, $query); ociexecute($stmt); while (ocifetchinto($stmt, $row)) { print "$row[0]\t$row[1]\t$row[2]"; print "<br>"; } } ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/49434-solved-need-help/ Share on other sites More sharing options...
Droopy Foom Posted May 1, 2007 Author Share Posted May 1, 2007 nevamind i did it was me being dumb Link to comment https://forums.phpfreaks.com/topic/49434-solved-need-help/#findComment-242265 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.