i'm newbie for PHP and just try simple form but have issue with insert.php page first of all my db consist of 4 record (id ,name ,phonenumber,date) the id column is auto increment page .
i create to display information to page call index php it's work well but the problem is insert.php page that page doesn't load and can not inset value and go to see new insert value in index php page
i create to display information to page call index php it's work well but the problem is insert.php page that page doesn't load and can not inset value and go to see new insert value in index php page
PHP:
<?php
if(isset($_post['name'])){
$mysqli = new mysqli('localhost','root','','interdet');
$statement =$mysqli->prepare("INSERT INTO detectives(name)VALUES(?,?)";
$statement->bind_param('ss',$_POST['name']);
$statement->execute();
echo "Done! <a href='index.php'>Go here see new detective </a>";
}
else {
?>
<form action="insert.php" method="POST">
<p>Name : <input type="text" name="name" /> <P>
<p><input type="submit"/></p>
</form>
<?php } ?>
