Login Form



Kode HTML (tugasLoginForm.html)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

Transitional//EN">
<html>
<head>
<title>Login Form by_Venty Yulita</title>
<style type="text/css">
#apDiv1 {
position:absolute;
width:380px;
height:330px;
z-index:1;
left: 449px;
top: 136px;
background-color: #00F8FE;
border: 2px solid Blue;
}
#apDiv3 {
position:absolute;
width:80px;
height:25px;
z-index:2;
left: 289px;
top: 274px;
}
.style3 {
font-size: 10px;
font-weight: bold;
}
#apDiv2 {
position:absolute;
width:412px;
height:115px;
z-index:2;
top: 0px;
left: 2px;
}
#header{
width:380px;
height:98px;
}
#footer{
width:380px;
height:40px;
}
body {
background-image: url(GAMBARKU.JPG);
}
</style>
<script type="text/javascript">
function error1()
{
alert('Masukkan User Name dan Password Terlebih Dahulu

');
}
function check()
{
if(form1.pass.value == "" || form1.user.value=="")
{
error1();
}
}
</script>

</head>
<body onLoad="document.form1.user.focus();">
<form name="form1" method="post" action="check.php">
<div id="apDiv1">
<div id="header">
</div>
<div>
<div align="center"><strong><br>User Name :</strong>
<br>
<input type="text" name="user" size="35" value=""

style="background-color:#FDF7D1">
<br>
<br>
<strong>Password : </strong>
<br>
<input type="password" name="pass" size="35"

style="background-color:#FDF7D1">
<br>
<br>
</div>
</div>
<br>
<div id="apDiv3">
<input type="submit" name="submit" value=" L O G I N "

onClick="check()">
</div>
<div id="footer" align="left"><br>
</div>
</div>
</form>
</body>
</html>

Script PHP (check.php)
<!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>
<title>Form Administrator</title>
</head>
<body>
<?php
if(($_POST['user']=='vjline') AND

($_POST['pass']=='ituaku')) {
echo 'Sukses, Anda Telah Masuk Halaman Administrator

Dengan User Name :'.$_POST['user'];
echo '<br><br>Hallo, Mr/Mrs ' . $_POST['user'];
}
else {
echo "<br><br><br><body text='red'><strong><center>Ada

Kesalahan Pada Waktu Anda Login...!<br><br><a

href='tugasLoginForm.html'><h4>Kembali Ke

Login</h4></a></center></strong></body>";

}
?>
</body>
</html>

1 komentar:

kangmusa said...

assalamualaikum
ini kunjungan kesekian kali ke blog sahabat :)
dan menyimak terus update postingan yang semakin menarik
sekaligus memberi info bahwa kangmusa telah membuat ebook baru
"Blog Monetization Options" yang bisa diunduh disini
terima kasih, saya tunggu kunjungan Anda di kangmusa.com
salam hangat
kangmusa

Post a Comment

Live Traffic Visitor