Alıntı
<?php
$conn = mysqli_connect('localhost', 'root', 'password', 'db');
mysqli_set_charset($conn, 'utf8');
if (!$conn)
{
die(mysqli_error());
}
$open = fopen("liste.txt", "r");
while (!feof($open))
$getTextLine = fgets($open);
$explodeLine = explode(":",$getTextLine);
list($ogrencino,$ogrenciadi) = $explodeLine;
{
$getTextLine = fgets($open);
$qry = "insert into ogrencilerim (ogrencino,ogrenciadi) values('".$ogrencino."','".$ogrenciadi."')";
mysqli_query($conn,$qry);
}
?>