Php to MySQL database

Sorry for my bad English. I have problem with MySQL database, I can’t push the information into the table. My php code seems to work, but when I run it nothing happens. If somebody can help I will appreciate it.

 $servername = "localhost";
 $fname = "fname";
 $lname = "lname";
 $klas = "klas";
 $nomer = "nomer";
 $file = "dom";
 $dbname = "homeworks";

 $conn = new mysqli($servername, $fname, $lname,$klas,$file,$dbname);

 $sql = "INSERT INTO student (fname, lname,klas,file)
 VALUES ($servername, $fname, $lname,$klas,$file,)";


Source: sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.