 <p><strong>Try this :</strong> </p> <pre><code>$day = mysql_real_escape_string($_POST['day']); $mont= mysql_real_escape_string($_POST['mont']); $year = mysql_real_escape_string($_POST['year']); $shour = mysql_real_escape_string($_POST['shour']); $ehour = mysql_real_escape_string($_POST['ehour']); $user = mysql_real_escape_string($_POST['user']); $sql="INSERT INTO reservations (day, mont, year, shour, ehour, user) VALUES ('$day', '$mont','$year', '$shour','$shour','$user')"; </code></pre>