* Login   * Register


Last visit was:
It is currently Sat Feb 24, 2018 3:01 pm
View unanswered posts
View active topics





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: code xu ly dang nhap
PostPosted: Tue Jun 02, 2009 11:00 pm 
Offline
User avatar

Joined: Thu Feb 05, 2009 4:25 pm
Posts: 4
<?php
session_start();
include("KetNoi.php");
$u=$HTTP_POST_VARS["user"];
$p=$HTTP_POST_VARS["pass"];
$ok=$HTTP_POST_VARS["ok"];

$sql="Select *from nsd where User='$u' and Pass='$p'";
$kq=mysql_query($sql,$kn);
if(isset($ok))
{
if(empty($u)||empty($p))
{
echo "Nhập vào User và Pass";
require ("DangNhap.php");
}
else
{
if(mysql_num_rows($kq)==0)
{
echo "Sai User Hoặc Password <a href=DangNhap.php>Nhập Lại</a><br>";
echo "Quên Password <a href=TimMatKhau.php>Tìm Password</a><br>";
echo "Chưa có tài Khoản <a href=DangKi.php>Đăng Kí</a><br>";
}
else
{
echo "<H1 align=center>Thông Tin Thành Viên</H1>";
echo "Bạn đã đăng nhập thành công! <br>";
$_SESSION['user'] = $u;
$k=$_SESSION['user'];
echo "User:$k<br>";
?>
<p align="center">
<a href=SuaMatKhau.php>Sửa Mật Khẩu</a>
<a href=ThemThongTin.php>Thêm Thông Tin</a>
<a href=HienThi.php>Hiển Thị DS Thành Viên</a>
<?
if($u=admin)
echo "<a href=QuanLy.php>Quản Lý DS Thành Viên</a>";
echo "</p>";
}
}
}
?>


Report this post
Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: code xu ly dang ki
PostPosted: Tue Jun 02, 2009 11:02 pm 
Offline
User avatar

Joined: Thu Feb 05, 2009 4:25 pm
Posts: 4
<?php
require("ketnoi.php");
$username=$_POST["user"];
$password=$_POST["pass"];
$email=$_POST["email"];
$diachi=$_POST["diachi"];
$sql="select *from user where username='$username'";
$kq=mysql_query($sql,$conn);
if(mysql_num_rows($kq)!=0)
{
echo "user da ton tai";
}
else
{
$sql="insert into user(username,password,email,diachi) value ('$username','$password','$email','$diachi')";
$kq=mysql_query($sql,$conn);
echo "them thanh cong";
}
?>


Report this post
Top
 Profile E-mail  
Reply with quote  
 Post subject: Re: code xu ly sua
PostPosted: Tue Jun 02, 2009 11:04 pm 
Offline
User avatar

Joined: Thu Feb 05, 2009 4:25 pm
Posts: 4
---------
<?php
require"ketnoi.php";
$user=$_POST["user"];
$pass=$_POST["pass"];
$email=$_POST["email"];
$diachi=$_POST["diachi"];
$sql="update user set password='$pass', email='$email',diachi='$diachi' where username='$user'";
echo"$sql";
//$sql="delete from thanhvien where ten='$user'";
$kq=mysql_query($sql,$conn);
include"sua1.php";
?> <a href='capnhatds.php'>Tro Ve</a>;<?


?>


Report this post
Top
 Profile E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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

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