gencprens Posted April 13, 2007 Share Posted April 13, 2007 Merhaba arkadaşlar, bir access veri tabanı yaptım. ogrenci_ad,ogrenci_soyad,ogrenci_bolum,ogrenci_sinif v.s v.s alanlar oluşturdum ve asp'de çalıştırabiliyorum sadece.ben bu veri tabanı ve alanları olduğu gibi sql ve php ye geçmek istiyorum. Yardım edebilecek arkadaş var mı? Çok ufak bişey php bilenler 10 dk'da hazırlar bile. Oluşturduğum dosyalar ... http://www.cizrem.com/gmyo.rar[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 14, 2007 Share Posted April 14, 2007 ogrenci Tablosu .SQL kodları : CREATE TABLE `ogrenciler` ( `id` int(11) NOT NULL auto_increment, `ogrenci_ad` varchar(150) character set latin5 NOT NULL default '', `ogrenci_soyad` varchar(150) character set latin5 NOT NULL default '', `ogrenci_no` int(11) NOT NULL, `ogrenci_bolum` varchar(150) character set latin5 NOT NULL default '', `ogrenci_sinif` int(11) NOT NULL, `ogrenci_ders` varchar(150) character set latin5 NOT NULL default '', `ogrenci_tcno` int(11) NOT NULL, `ogrenci_v1` int(11) NOT NULL, `ogrenci_v2` int(11) NOT NULL, `ogrenci_final` int(11) NOT NULL, `ogrenci_harf` varchar(10) character set latin5 NOT NULL default '', PRIMARY KEY (`id`)) ENGINE=MyISAM;[/CODE] Link to comment Share on other sites More sharing options...
gencprens Posted April 15, 2007 Author Share Posted April 15, 2007 ogrenci Tablosu .SQL kodları : CREATE TABLE `ogrenciler` ( `id` int(11) NOT NULL auto_increment, `ogrenci_ad` varchar(150) character set latin5 NOT NULL default '', `ogrenci_soyad` varchar(150) character set latin5 NOT NULL default '', `ogrenci_no` int(11) NOT NULL, `ogrenci_bolum` varchar(150) character set latin5 NOT NULL default '', `ogrenci_sinif` int(11) NOT NULL, `ogrenci_ders` varchar(150) character set latin5 NOT NULL default '', `ogrenci_tcno` int(11) NOT NULL, `ogrenci_v1` int(11) NOT NULL, `ogrenci_v2` int(11) NOT NULL, `ogrenci_final` int(11) NOT NULL, `ogrenci_harf` varchar(10) character set latin5 NOT NULL default '', PRIMARY KEY (`id`)) ENGINE=MyISAM;[/CODE] abi allah razı olsun, teşekkür ederim de ben asp ile yazdım php bilmiyorum. şimdi bunu nasıl php sayfalarına dönüştürecem benim yaptığım asp tarzında Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 16, 2007 Share Posted April 16, 2007 Sayfa Çevirmelerini vakit buldukça sırası ile buradan yazarım; ilk olarak db.asp --> yeni adı --> db.php <?// Host Bilgileriniz. $dbServer = "localhost";$dbDatabase = "DataBaseadi";$dbUser = "Dbkullanıcıadı";$dbPass = "şifre"; $mysql_baglanti = @mysql_connect($dbServer,$dbUser,$dbPass,$dbDatabase) or die ("Veritabanı Bağlantı Hatası"); @mysql_select_db("$dbDatabase",$mysql_baglanti) or die ("Veritabanı Seçim Hatası");$sql="select * from ogrenciler";?>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 16, 2007 Share Posted April 16, 2007 arabul.asp --> yeni adı --> arabul.php <?include('db.php');$ogrencino=$_REQUEST['no'];$sorgu=mysql_query("select * from ogrenciler where ogrenci_no='".$ogrencino."'")or die(mysql_error());$detay=mysql_fetch_array($sorgu);?><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #3399FF;}.style1 { color: #FFFFFF; font-weight: bold; font-family: Georgia, "Times New Roman", Times, serif;}.style2 { color: #FFCC66; font-weight: bold;}--></style><p>ADI: <?=$detay('ogrenci_ad')?><br />SOYAD:<?=$detay('ogrenci_soyad')?><br /><form action="kaydet.php" method="post">OGRENCİ NO: <input name="no" type="text" dir="ltr" value="<?=$detay('ogrenci_no')?>" size="10" maxlength="10" readonly="true" /><br />VİZE 1:<input name="vize1" type="text" dir="ltr" value="<?=$detay('ogrenci_v1')?>" size="3" maxlength="3" />VİZE 2:<input name="vize2" type="text" dir="ltr" value="<?=$detay('ogrenci_v2')?>" size="3" maxlength="3" />Final:<input name="final" type="text" dir="ltr" value="<?=$detay('ogrenci_final')?>" size="3" maxlength="3" /><input type="submit" name="Submit" value="Submit" /></form>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 16, 2007 Share Posted April 16, 2007 default.asp --> yeni adı --> default.php <style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #3399FF;}.style1 { color: #FFFFFF; font-weight: bold; font-family: Georgia, "Times New Roman", Times, serif;}.style2 { color: #FFCC66; font-weight: bold;}--></style><p> </p><p> </p><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr></table><p> </p><p> </p><p align="center"><span class="style1">Gaziantep MYO</span><br /> <span class="style2">T.c Kimlik No Gir</span><br /><form action="sevket.php" method="post"> <input name="tcno" type="text" lang="tr" maxlength="11" /><br /><label><input type="submit" name="gonder" value="Gonder" /></label></form></p>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 16, 2007 Share Posted April 16, 2007 dizayn.css olduğu gibi aynı dizine koyulacak. bugünlük bu kadar, sonra devam ederim Link to comment Share on other sites More sharing options...
gencprens Posted April 16, 2007 Author Share Posted April 16, 2007 verylife abi sabırsızlıkla bekliyorum.bu arada yardımcı olduğun için teşekkür ederim. Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 17, 2007 Share Posted April 17, 2007 kaydet.asp --> kaydet.php <?phpinclude('db.php');$no = $_REQUEST['no'];$vize1 = $_REQUEST['vize1'];$vize2 = $_REQUEST['vize2'];$final = $_REQUEST['final'];$ad = $_REQUEST['ad'];$soyad = $_REQUEST['soyad'];$bolum = $_REQUEST['bolum'];$sinif = $_REQUEST['sinif'];$tcno = $_REQUEST['tcno'];$harf = $_REQUEST['harf'];$sorgu =mysql_query(" INSERT INTO ogrenci (ogrenci_ad,ogrenci_soyad,ogrenci_no,ogrenci_bolum,ogrenci_sinif,ogrenci_tcno,ogrenci_v1,ogrenci_v2,ogrenci_final,ogrenci_harf)VALUES ('$ad','$soyad','$no','$bolum','$sinif','$tcno','$vize1','$vize2','$final','$harf'))or die(mysql_error());echo " kayıt edildi.";?>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 18, 2007 Share Posted April 18, 2007 kaydet2.asp --> kaydet2.php <?phpinclude('db.php');$ad = $_REQUEST['ad'];$soyad = $_REQUEST['soyad'];$no = $_REQUEST['tcno'];$bolum = $_REQUEST['bolum'];$sinif = $_REQUEST['sinif'];$harf = $_REQUEST['harf'];?><?php$sorgu =mysql_query( " INSERT INTO ogrenci (ogrenci_ad,ogrenci_soyad,ogrenci_no,ogrenci_bolum,ogrenci_sinif,ogrenci_tcno,ogrenci_harf)VALUES ('$ad','$soyad','$no','$bolum','$sinif','$harf'))or die(mysql_error());echo " kayıt edildi.";?>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 18, 2007 Share Posted April 18, 2007 listele.asp --> listele.php <?phpinclude('db.php');$sorgu=mysql_query("select * from ogrenciler order by ogrenci_ad asc")or die(mysql_error());$toplam = mysql_num_rows($sorgu);for ($j=0; $bilgi=mysql_fetch_array($sorgu); $j++){echo $bilgi['ogrenci_ad'];echo "---";echo $bilgi['ogrenci_soyad'];echo "---";echo $bilgi['ogrenci_vize1'];}echo "<br>..Listeleme Bitti : Toplam Kayıt ";echo $toplam;?>[/CODE] Link to comment Share on other sites More sharing options...
onder Posted April 18, 2007 Share Posted April 18, 2007 Elinde mdb (accesda hazırladığın veri tabınını) MdbToMySQL ( ekte verdim. ) bu programla mysql çeviredebilirsin ve νєяуLife © verdiği php sayfalarını localde yada hostta mysqline .sql import ederek php ye geçmiş olacaksın.. kısaca anlatımı aşağıda.. İşlemi 3 adımda gerçekleştirebiliyoruz. Ekran resminde gördüğünüz 1 nolu alandaki Locate .MDB file düğmesine basarak Access(.mdb) veritabanı dosyamızı seçiyoruz. Ardından bu veritabanı içerisindeki tablolar 2 nolu alanda listeleniyor. SQL sorgularını elde etmek istediğimiz tabloları buradan seçiyoruz ve son adım olarak 3 nolu alandaki Export MySQL file düğmesine basıyoruz. Sizden sql sorgusu dosyanıza bir isim koymanızı ve bilgisayarınıza kayıt yapılacak dizini seçmenizi isteyecektir. Üstteki 3 kolay adım ile Access veritabanımıza ait mysql dosyasını elde etmiş oluyoruz. Bu dosyayı MySQL üzerinde yaratmış olduğumuz veritabanına en bilindik yöntem olan PhpMyAdmin’in SQL sorgusu alanına yükleyerek ya da dosya içerisindeki sql kodlarını yine bu alandaki SQL sorgusu kutusuna yapıştırdıktan sonra, sorguyu çalıştırarak gerçekleştirebiliriz. download.: http://www.tnctr.com/s/?rY29 Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 18, 2007 Share Posted April 18, 2007 ogrenci_kaydet.asp --> ogrenci_kaydet.php bu sayfada sadece <FORM action="kaydet.asp" method="post">[/CODE] kısmını [CODE]<FORM action="kaydet.php" method="post">[/CODE] [b]ile değiştir.[/b] [color=#FF0000][b]bu arada ellerine sağlık [color=#3333FF]Onder[/color], güzel bir program tavsiye ederim.[/b][/color] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 25, 2007 Share Posted April 25, 2007 sevket.asp --> sevket.php <?include("db.php");?><html><link rel="stylesheet" href="dizayn.css" /><?$tcno=$_REQUEST['tcno'];$sorgu=mysql_query("select * from ogrenciler where ogrenci_tcno=' ".$tcno." '")$sonuc=mysql_num_rows($sorgu);$bilgi=mysql_fetch_array($sorgu);if(!$sorgu > 1 ){echo "Böyle bir kayıt yok veya yanlış numara girdiniz.";}else {?><p> </p><p> </p><p> </p><p> </p><CENTER><table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC"> <tr> <td width="75"><strong>ADI</strong></td> <td width="425" class="fullnewstitle"><?=$bilgi['ogrenci_ad']?> </td> </tr> <tr> <td><strong>SOYADI</strong></td> <td class="fullnewstitle"><?=$bilgi['ogrenci_soyad']?> </td> </tr> <tr> <td><strong>BÖLÜMÜ</strong></td> <td class="fullnewstitle"><?=$bilgi['ogrenci_bolum']?> </td> </tr> <tr> <td><strong>SINIF</strong></td> <td class="fullnewstitle"><?=$bilgi['ogrenci_sinif']?> </td> </tr> <tr> <td><strong>DERSİN ADI: </strong></td> <td class="fullnewstitle"><?=$bilgi['ogrenci_ders']?> </td> </tr></table><p> </p><table width="500" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="125"><div align="center"><strong>Vize 1 </strong></div></td> <td width="125"><div align="center"><strong>Vize 2 </strong></div></td> <td width="125"><div align="center"><strong>Final</strong></div></td> <td width="125"><div align="center"><strong>HARF</strong></div></td> </tr> <tr> <td width="125"><div align="center"><?=$bilgi['ogrenci_v1']?></div></td> <td width="125"><div align="center"><?=$bilgi['ogrenci_v2']?></div></td> <td width="125"><div align="center"><?=$bilgi['ogrenci_final']?></div></td> <td width="125"><div align="center"></div></td> </tr></table></CENTER><? } ?></html>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 25, 2007 Share Posted April 25, 2007 sifreli_sayfa.asp --> sifreli_sayfa.php // bunu biraz değiştirdim. <head><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9"><title>Dikkat Lütfen Şifenizi Giriniz.. // Editör Giriş İzni</title></head><body bgcolor="#FFFFFF"><p align="center"><br><br><br><b><font color="#000080" size="1"><font size="4">Lütfen Şifrenizi Giriniz...</font> </font> </b> <form method="post" action="yonet.php"><p align="center"><input type="password" name="parola" value size="44" class="form" style="border-style: solid; border-width: 1px; border-color: #cccccc; font-family: verdana; font-size: 10px;"><br> <input type="submit" value=" Giriş " class="form" style="border-style: solid; border-width: 1px; border-color: #cccccc; font-family: verdana; font-size: 10px; background-color: #e6e6e6"></form><p align="center"> </p></body></html>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 25, 2007 Share Posted April 25, 2007 yonet.asp --> yonet.php <style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #3399FF;}.style1 { color: #FFFFFF; font-weight: bold; font-family: Georgia, "Times New Roman", Times, serif;}.style2 { color: #FFCC66; font-weight: bold;}--></style><?$parola = $_GET['parola'];if($parola =="gmyo" ){?><p> <form action="arabul.asp" method="post"> Öğrenci No:<input name="no" type="text" id="no" /> <input type="submit" name="Submit" value="Giriş" /> </form></p><? } else { ?><b>YANLIŞ PAROLA</b><? } ?>[/CODE] Link to comment Share on other sites More sharing options...
νєяуLife © Posted April 25, 2007 Share Posted April 25, 2007 @gencprens bu cevirme islemlerini Local sunucu olmadan yaptım, herhangi bir hata ile karsilasirsan buaraya yaz. Bu dosyaları kullanmak icin APACHE2TRIAD'i tavsiye ederim. APACHE2TRIAD kurduktan sonra, c:\apache2triad\htdocs\dizin_adi\dosyalarinin_tamami şeklinde yeni bir diniz olustur ve dosyalarini oraya kopyala, sonrasinda seklinde dosyalarina ulasabilirsin. veritabanin yuklemek icin, Please register to see this content. adresine APACHE2TRIAD'i kurarken vermis oldugun k.adi ve parola ile giris yap ( genelde root ve parola bos olur) ana sayfada yeni bir vt olustur var. oraya vt adini yaz, daha sonra sol taraftan olusturdugun vt yi sec ve ustte SQL komutu ( SQL calistir ) linkine tikla ustte vermis oldugum .SQL kodlarini yapistir ve calistir. son olarak db.php icindeki $dbServer = "localhost";$dbDatabase = "DataBaseadi";$dbUser = "Dbkullanıcıadı";$dbPass = "şifre";[/CODE] [color=#FF0000]bilgileri duzenle,[/color] [color=#009900]hatalari tekrar buraya yaz,[/color] iyi calismalar dilerim.[/b] Link to comment Share on other sites More sharing options...
gencprens Posted April 29, 2007 Author Share Posted April 29, 2007 Teşekkür ederim abicim çok sağol yaa..Allah razı olsun... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.