* Login   * Register


Last visit was:
It is currently Fri Dec 14, 2018 6:13 pm
View unanswered posts
View active topics





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SỬA PASS VÀ XỬ LÍ THAY ĐỔI ĐÂY NÈ CÁC BẠN CÓ THI NĂM K6 ĐÓ!!
PostPosted: Wed Jun 03, 2009 12:01 am 
Offline

Joined: Sun Feb 08, 2009 11:00 pm
Posts: 29
---------
SỬA PASS


<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>BANG DANG KY</title>
</head>

<body>

<form method="POST" action="change.php">
<p align="center">BANG SUA PASSWORD</p>
<p>&nbsp;</p>
<p>USERNAME :&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="username" size="50" maxlenght="30"></p>
<p>PASSWORD :&nbsp;&nbsp;&nbsp;&nbsp; <input type="password" name="password" size="20" maxlength="10"></p>
<p>CHANGEPASS :
<input type="password" name="cpassword" size="20" maxlength="10"></p>

<p align="center"><input type="submit" value="CHANGE" name="sb">&nbsp;&nbsp;&nbsp;
</p>
</form>

</body>

</html>
XỬ LÍ CHANGE
<?php
$u=$HTTP_POST_VARS["username"];
$p=$HTTP_POST_VARS["password"];
$cp=$HTTP_POST_VARS["cpassword"];
$s=$HTTP_POST_VARS["sb"];

$kn=mysql_connect("localhost","root","")
or die("ket noi that bai");
mysql_select_db("QLHH",$kn);

$sql="SELECT * FROM NSD WHERE user='$u' AND pass='$p'";
$kq=mysql_query($sql,$kn);

if(isset($s))
{
if(empty($u)||empty($p)||empty($cp))
{
echo"ban da nhap chua day du thong tin.Hay nhap lai nhe!";
require"suapass.php";
}
else
{
if(mysql_num_rows($kq)>0)
{
$sql="UPDATE NSD SET pass='$cp' WHERE user='$u'";
mysql_query($sql,$kn);
mysql_close($kn);
echo"ban sua password thanh cong roi.Chuc mung nha!";
require "dn.php";
}
else
{
echo"ban chua co tai khoan hay dang ki di.";
require"dk.php";
}

}
}

?>


Report this post
Top
 Profile E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Make Forum · php-BB© · Internationalization Project · Report abuse · Terms Of Use/Privacy Policy
© Forums-Free.com 2009