hi everybody,
there is someone who can help me to find out how to create a delete button .Indeed,I have then 2 buttons, one for insert(works well),second one is therefore for to delete.
You can check out below the code:[php]
?>
<?php
if(isset($_POST['Delete'])){
$query="DELETE FROM SCANNER WHERE SCANNER.scanNo ='".$scanNo."'" ;
$result=mysql_q uery($query);
}
?>
<form action="procesc anin.php" method="get" name="scanin_fo rm">
<div align="center">
<table>
<tr><td> scannerNummer:</td>
<td> <input name="scanNo" type="text" ></td><td> </td>
</tr>
<tr><td>Type: </td>
<td> <input name="type_id" type="text" ></td><td> </td>
</tr>
<tr><td>  ;</td><td><input name="Insert" type="submit" value="Insert" ></td>
<td> </td><td><input name="Delete" type="submit" value="Delete"> </td>
<td> </td><td><input type="hidden" name="For_to_de lete" value="<?php echo $_REQUEST["scanNo"];?>"> </td>
</tr>
</table>
</div>
</form>[/php]
At the end when i click on delete,it acts as insert button.
Regards,
Bazubwabo J.B.
IT student
there is someone who can help me to find out how to create a delete button .Indeed,I have then 2 buttons, one for insert(works well),second one is therefore for to delete.
You can check out below the code:[php]
?>
<?php
if(isset($_POST['Delete'])){
$query="DELETE FROM SCANNER WHERE SCANNER.scanNo ='".$scanNo."'" ;
$result=mysql_q uery($query);
}
?>
<form action="procesc anin.php" method="get" name="scanin_fo rm">
<div align="center">
<table>
<tr><td> scannerNummer:</td>
<td> <input name="scanNo" type="text" ></td><td> </td>
</tr>
<tr><td>Type: </td>
<td> <input name="type_id" type="text" ></td><td> </td>
</tr>
<tr><td>  ;</td><td><input name="Insert" type="submit" value="Insert" ></td>
<td> </td><td><input name="Delete" type="submit" value="Delete"> </td>
<td> </td><td><input type="hidden" name="For_to_de lete" value="<?php echo $_REQUEST["scanNo"];?>"> </td>
</tr>
</table>
</div>
</form>[/php]
At the end when i click on delete,it acts as insert button.
Regards,
Bazubwabo J.B.
IT student
Comment