<?php
$db_host = 'localhost';
$db_isim = '*****';
$db_kul = '*****';
$db_sifre = '*****';
$db_link = @mysql_connect($db_host,$db_kul,$db_sifre) or die ('<h2>Bağlantı kurulamıyor !</h2>'.mysql_error());
$veri_tabani = @mysql_select_db($db_isim,$db_link) or die ('<h2>Veritabanı açılamıyor !<br></h2>'.mysql_error());
@$kosul = $_GET['kosul'];
if ($kosul == "kaydet")
{
$sorgu = "UPDATE ayarlar SET deger='$_POST[dil_deger]' where isim='dil' LIMIT 1";
$sonuc = mysql_db_query($db_isim,$sorgu) OR die ('<h2>sorgu başarısız !</h2>'.mysql_error());
header('Location: ayar.php');
exit();
}
?>
<html>
<head>
<title>Ayarlar</title>
</head>
<body>
<form action="ayar.php?kosul=kaydet" method="post" name="form">
<table cellspacing="1" width="100%" cellpadding="6" border="0" bgcolor="#ffffff">
<tr>
<td>
Dil Seçin :
</td>
<td>
<select name="dil_deger">
<option value="turkce">Türkçe</option>
<option value="ingilizce">İngilizce</option>
</select>
<br>
<input type="submit" name="ayar_kaydet" value="GÖNDER">
</td>
</tr>
</table>
</form>
</body>
</html>