Üye Kaydı
PHP Uygulamaları Mart 3rd, 2007PHP ile Mysql veritabanına kayıt:
Ve işte kodlar:
index.html
HTML:
-
<!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">
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-
<style type="text/css">
-
<!--
-
.style2 {
-
font-family: Verdana, Arial, Helvetica, sans-serif;
-
font-size: 12px;
-
}
-
.style3 {
-
font-size: 10px;
-
font-weight: bold;
-
}
-
.style4 {
-
font-family: Georgia, "Times New Roman", Times, serif;
-
font-size: 24px;
-
font-weight: bold;
-
}
-
-->
-
</style>
-
</head>
-
-
<form action="baglan.php" method="post" name="form1" class="style2" id="form1">
-
<label>Ad:
-
<input name="ad" type="text" id="ad" />
-
</label>
-
<label>Soyad:
-
<input name="soyad" type="text" id="soyad" />
-
</label>
-
</p>
-
<input name="kullaniciadi" type="text" id="kullaniciadi" />
-
</label>
-
</p>
-
<label>Şifre:
-
<input name="sifre" type="password" id="sifre" />
-
</label>
-
<label>E-Mail:
-
<input name="email" type="text" id="email" />
-
</label>
-
</p>
-
<label>Görüş:
-
<textarea name="gorus" rows="5" id="gorus"></textarea>
-
</label>
-
</p>
-
<input type="submit" name="Submit" value="Üye Ol" />
-
</label>
-
</p>
-
</form>
-
</body>
-
</html>
baglan.php
PHP:
-
<?
-
$sql ="insert into uyeler (ad, soyad, kullaniciadi, sifre, email, gorus) values ('$ad', '$soyad', '$kullaniciadi', '$sifre', '$email', '$gorus')";
-
echo "Kayit basariyla tamamlandi." . "<a href='goruntule.php'>Kayitli olan kullanicilarin bilgilerini görüntülemek için tiklayin...</a>";
-
} else {
-
echo "Kayit basarisiz.";
-
}
-
?>
goruntule.php
PHP:
-
<html>
-
<body>
-
<title>Kullanıcı Listesi</title>
-
<table border="1" bordercolor="90022E" width="100%">
-
<tr>
-
<td width="16%"><font face="Arial Black" size="2">Adi</font></td>
-
<td width="16%"><font face="Arial Black" size="2">Soyadi</font></td>
-
<td width="17%"><font face="Arial Black" size="2">Kullanici adi</font></td>
-
<td width="13%"><font face="Arial Black" size="2">Sifre</font></td>
-
<td width="21%"><font face="Arial Black" size="2">E-Mail</font></td>
-
<td width="17%"><font face="Arial Black" size="2">Görüs</font></td>
-
</tr>
-
<?
-
?>
-
<tr>
-
</tr>
-
<?
-
}
-
?>
-
</table>
-
</body>
-
</html>