Salaaam $sql = "INSERT INTO BOOK(bookname, authorsname, ISBN) VALUES ('".$_POST[bookname]."'' , '".$_POST[authorsname]."',''".$_POST[ISBN]."')"; above line is correct, your code is wrong ,$_POST[ISBN]')"; and add $host = 'localhost'; $con = mysql_connect($host, $username, $password); you can also check this page: http://php.net/manual/en/function.mysql-connect.php Regards, Shahrzad