I am trying to delete a member of staff from a table using php using a drop down menu of staff id's he is my code
<!-- deletestaffmember.php -->
<html><body>
<?php
putenv("TNS_ADMIN=/u1/oracle/Products/shu10g/network/admin");
$conn = OCILogon("wkagonye","maniki", "shu10g");
$query = "select StaffNo from tblstaff";
$stmt = ociparse($conn, $query);
ociexecute($stmt);
?>
<form action="deletestaffmember.php" method="post">
staffno
<select name="StaffNo">
<option></option>
<?php
while (ocifetchinto($stmt, $row))
{
print "<option>";
print $row[0];
print "</option>";
}
?>
</select>
<input type="Submit" name="Submit" value="Delete Staff member">
</form>
<?php
if ($_POST["StaffNo"]=="")
{
print "Please Select a member of staff using a staff number to Delete";
}
else
{
$staffno =$_POST[StaffNo];
$query = "delete from tblstaff where StaffNo = '$StaffNo' ";
$stmt = ociparse($conn, $query);
ociexecute($stmt);
while (ocifetchinto($stmt, $row))
{
print "$row[0]\t$row[1]";
print "<br>";
}
}
?>
</body></html>
This is the error message i get
Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done before fetch or execute and fetch in /homedir/ilex-s04/dsmith25/public_html/deletestaffmember.php on line 45
any answers