
Db latin1_swedish_ci
Sayfa Türkçe Windows(iso-8859-9)

Arama yapan sayfa
<?php include("ayar.php");?>
<?php
$ara = $_POST['veri'];
$secim = $_POST['select'];
if($secim == "no") {
$anahtar = "OgrNo";
}elseif($secim == "sinif"){
$anahtar = "SinifNo";
}elseif($secim == "adi"){
$anahtar = "Ad";
}elseif($secim == "soyadi"){
$anahtar = "Soyad";
}
$sorgu = mysql_query("select * from deneme2 WHERE ".$anahtar." LIKE '%".$ara."%'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>Telefon Rehberi</title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
.style2 {font-weight: bold}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="#">
<table width="1278" border="0">
<tr>
<th width="346" scope="col"><div align="left">
<input type="text" name="veri" />
<select name="select">
<option value="adi" selected="selected">Adı</option>
<option value="soyadi">Soyadı</option>
<option value="sinif">Sınıf</option>
<option value="no">No</option>
</select>
<input type="submit" name="Submit" value="Ara" />
</div></th>
<th width="922" scope="col"></th>
</tr>
</table>
</form>
<table width="1275" border="1">
<tr>
<th width="43" bgcolor="#999999" scope="col"> No </th>
<th width="54" bgcolor="#999999" scope="col">Sınıf </th>
<th width="157" bgcolor="#999999" scope="col"> Adı </th>
<th width="155" bgcolor="#999999" scope="col">Soyadı</th>
<th width="139" bgcolor="#999999" scope="col">Telefon No </th>
<th width="153" bgcolor="#999999" scope="col">Mobil No </th>
<th width="151" bgcolor="#999999" scope="col">Anne Mobil </th>
<th width="114" bgcolor="#999999" scope="col">Anne Adı </th>
<th width="105" bgcolor="#999999" scope="col">Baba Mobil </th>
<th width="140" bgcolor="#999999" scope="col">Baba Adı </th>
</tr>
<?php
while($veri = mysql_fetch_assoc($sorgu)){?>
<tr>
<th height="2" bgcolor="#CCCCCC" scope="row"><?php echo $veri[OgrNo]; ?></th>
<td bgcolor="#CCCCCC"><?php echo $veri[SinifNo]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[Ad]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[Soyad]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[Tel]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[Mobil]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[AnneMobil]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[AnneAd]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[BabaMobil]; ?></td>
<td bgcolor="#CCCCCC"><?php echo $veri[BabaAd]; ?></td>
</tr>
<?php } ?>
</table>
</body>
</html>ayar.php<?
mysql_connect("localhost","xxxxxxx","xxxxxxxxx") or die(mysql_error());
mysql_select_db("xxxxxxx") or die (mysql_error());
function l_link($deger) {
$bozuk=array("Ö","ö","Ç","ç","Ð","ð","Ü","ü","Ý","ý",",",".",";",":","!","\"","'","^","+","-","_"," ","/","(",")","Þ","þ","?");
$duzgun=array("o","o","c","c","g","g","u","u","i","i","","","","","","","","","-","-","-","-","","","","s","s","");
$deger=str_replace($bozuk,$duzgun,$deger);
$deger=strip_tags($deger);
$deger=strtolower($deger);
$deger=trim($deger);
return $deger;
}
function koruma($deger) {
$deger=trim($deger);
$deger=strip_tags($deger);
$deger=mysql_escape_string($deger);
return $deger;
}
?>Şimdi yen birşey eklemek istiyorum. öğrenci resmi
veri tabanında image tipinde resim bilgisi var fakat ben bunu sql2005 den nasıl cıkaracağımı bilemiyorum
