It has two text input and a submit button. real_escape_string($_POST['name']); $Email = $con->real_escape_string($_POST['email']); $Phone = $con->real_escape_string($_POST['contact']); $comments = $con->real_escape_string($_POST['text']); //query to insert … First we connect MySQL with PHP using config.php file. An example to insert some data in to the MySQL database using PHP. POST Method: In this method, parameters are not saved in browser history.Data is not shown in the browser's URL.