CodeIgniter 3 get contents of file through form. i trying to show the output of the checkbox. Can anyone see whats up with this PHP / mySQLi code?echo "Failed to connect to MySQL: " . mysqliconnecterror() sql" INSERT INTO tablename (username, title, name, content, image To create the PHP code, we must first examine the HTML code of the form.Block 3 is the code used to make a connection to the MySQL server and the desired database you would like to connect to. Block 4 is the code to insert the users information into the table specified in the table variable. In this post i will show you that how to insert data into mysql database , this tutorial will use php , html and mysql together and using html user friendly form that get some information and inserts the data into mysql database specified table Insert data in MySQL table with PHP and MySQLi, INSERT INTO query, get insertid.Insert data from a form into a database. HTML forms are very often used to send data to a server script.