I am trying to create a comment board. Here is my table create by PHPMyAdmin
I set the guestID as primary key and auto-increment, but every time I trying to input a new guest name by php, it only could create a new column with a new ID but without the name.
Here is my code:
<?php
mysql_connect("localhost","root","root");
mysql_select_db("guest");
mysql_query("set names utf8");
$guestName=$_POST['guestName'];
mysql_query("insert into guest value(`guestID`, `guestName`)");
?>
<!DOCTYPE html>
<body>
<div class="container">
<div class="top">
<h3>New comment</h3>
</div>
<form id="form1" name="form1" method="post" action="" class="form-horizontal">
<div class="form-group">
<label for="guestName" class="col-sm-4 control-label">Name:</label>
<div class="col-sm-6">
<input type="text" class="form-control" placeholder="guestName" name="guestName" id="guestName" />
</div>
<div class="button">
<input type="submit" name="button" id="button" value="send" class="btn"/>
</div>
</form>