Üyelik sistemi ile ilgili dersimizin üçüncü bölümü ile devam ediyoruz.
Üyenin gerek kayıt olurken gerek giriş yaparken karşılaştığı hataların kullanıcıya gösterileceği bölüm:
hata.asp
<center>
<%
hata=request.QueryString("hata")
if hata=99 then
response.write("Bu mail adresine sahip bir kullanici bulunamadi.")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=1 then
response.write("Girdiginiz Kullanici adi baska bir üyemize ait lütfen baska bir kullanici adi yazin")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=9 then
response.write("Soyadiniz alanino doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=8 then
response.write("Adiniz alanini doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=2 then
response.write("Kullanici adi alanini doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=3 then
response.write("mail adresiniz alanini doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=4 then
response.write("Sifre alanini doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=5 then
response.write("Sifre tekrar alanini doldurunuz")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=6 then
response.write("Girdiginiz sifreler uyusmamaktadir")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%
if hata=7 then
response.write("Girdiginiz mail adresi zaten kullaniliyor")
%>
<table width="60" align="center" border="0">
<tr>
<td width="95"><div class="buttonwrapper">
<a class="squarebutton" href="javascript:void(0)" onClick="history.back(-1);"><span>Geri</span></a>
</div></td>
</tr>
</table>
<%end if%>
<%if hata="" then
response.write("<br>")
response.write("<center>")
response.write("<br>")
response.write("<a href='default.asp'><b>Geri</b></a>")
response.write("</center>")
end if
%>
</center>
Güvenli çıkış için gerekli sayfa:
cikis.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>Güvenli çıkış</title>
</head>
<body>
<%
session.Abandon()
response.Redirect("default.asp")
%>
</body>
</html>
Ve bir de veri tabanımız var. Eğer siz kendiniz oluşturmak isterseniz;
Veri tabanı adı: vt.mdb
Tablo adı: uye
İçindeki alanlar: id, uyead, uyemail, uyesifre, yetki, ad, soyad, bulyer
Kaynak dosyayı indirmek için tıklayın