+ 1
cant store data in database
I don't have any error but why I can't store data in the database when I'm trying to input something
1 Answer
+ 1
here's the php code
<?php
if(isset($_POST['submit1'])){
mysqli_query($conn,"insert into add_book values('','$_POST[bname]',$_POST[aname]','$_POST[pname]','$_POST[pdate]','$_POST[price]','$_POST[qty]','$_POST[aqty]','$_SESSION[librarian]')");
?>
<script type="text/javascript">
alert("books insert successfully");
</script>
<?php
}
?>