Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ขอดู code login หน่อยครับ ผมขอดู code ตัวอย่างการ login เข้าสู๋ระบบหน่อยครับ ขอบคุณมากครับ



 

ขอดู code login หน่อยครับ ผมขอดู code ตัวอย่างการ login เข้าสู๋ระบบหน่อยครับ ขอบคุณมากครับ

 



Topic : 044886



โพสกระทู้ ( 11 )
บทความ ( 0 )



สถานะออฟไลน์




ผมขอดู code ตัวอย่างการ login เข้าสู๋ระบบหน่อยครับ ขอบคุณมากครับ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-07-03 00:18:36 By : filmmaty View : 1019 Reply : 2
 

 

No. 1



โพสกระทู้ ( 3,748 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์
Facebook

อะให้ทั้งฟอร์มเลย
<? session_start();?>
<!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>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Login</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#3b5999">
  <tr>
    <th width="13%" height="60" scope="col">&nbsp;</th>
    <th width="87%" align="left" scope="col" class="style11">OKATOOLS</th>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#eeeff4">
  <tr>
    <th height="50" scope="col">&nbsp;</th>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th height="85" scope="col">&nbsp;</th>
  </tr>
</table>
<table width="650" height="200" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
  <tr>
    <td scope="col"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="35" valign="bottom" scope="col" class="style8"><b>WEBMASTER LOGIN</b></td>
      </tr>
    </table>
      <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td scope="col"><hr /></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th height="25" scope="col">&nbsp;</th>
        </tr>
      </table>
	<? 
		  include("config.php");
		  if(isset($_REQUEST["submit"])){
			session_start();
			session_register("username");
			session_register("password"); 
		  $array=mysql_fetch_array(mysql_query("select * from table_account where username = '$_REQUEST[username]' and password = '$_REQUEST[password]'"));
		  	if($array== 0){
				$_SESSION["username"]="";
				$_SESSION["password"]="";
	?>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="redborder">
        <tr>
        <td height="120" valign="top" scope="col"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" valign="top" scope="col" class="style10"><span class="style9"><b>Please Login To Amin</b> </span><br />The username you entered does not belong to any account. You may try clearing your browser's cache and cookies by following</td>
          </tr>
        </table>
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <th scope="col">&nbsp;</th>
            </tr>
            </table>
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td align="left" valign="top" scope="col" class="style10"><span class="style9"><b>กรุณาเข้าสู่ระบบก่อน</b> </span><br />การเข้าใช้งานระบบ Backend ของเว็บไซต์นี้ถือเป็นความลับ สำหรับผู้ที่มีสิทธิ์เข้าใช้งานเท่านั้น ผู้ที่ไม่ได้รับอณุาติ จะไม่มีสิทธิ์เข้าใช้ และหากผู้ไม่มีสิทธิ์ พยายาม<font color="#FF0000">เข้าระบบโดยไม่ได้รับอณุญาติ (Hack) </font>และพยายามกระทำการฝ่าผืน มีโทษร้ายแรงสูงสุด ตามกฏหมาย</d>
            </tr>
          </table></td>
      </tr>
    </table>
    <?
	}else{ 
				$_SESSION["username"]=$_REQUEST["username"];
				$_SESSION["password"]=$_REQUEST["password"];
  				echo "<meta http-equiv='refresh' content='0;URL=login.php'>";
			}
}
	?>
        <form name="Login" method="post" action="<? $_SERVER["PHP_SELF"];?>">
      <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="260" scope="col">&nbsp;</td>
          <td width="340" scope="col">&nbsp;</td>
        </tr>
        <tr>
          <td height="35"  align="right" class="style7" scope="col"><b>Username :&nbsp;</b></td>
          <td scope="col"><input name="username" type="text" size="25" maxlength="50" /></td>
        </tr>
        <tr>
          <td scope="col"  align="right" class="style7"><b>Password :&nbsp;</b></td>
          <td scope="col"><input name="password" type="password" size="25" maxlength="15"/></td>
        </tr>
        <tr>
          <td scope="col">&nbsp;</td>
          <td scope="col">&nbsp;</td>
        </tr>
        <tr>
          <td scope="col">&nbsp;</td>
          <td scope="col"><input name="submit" type="submit"  value="เข้าสู่ระบบ" class="style12" style="background-color:#3b5999; border:hidden;"/></td>
        </tr>
        <tr>
          <td scope="col">&nbsp;</td>
          <td scope="col">&nbsp;</td>
        </tr>
    </table></form>
    </td>
  </tr>
</table>
</body>
</html>







Date : 2010-07-03 09:46:27 By : Dragons_first
 


 

No. 2



โพสกระทู้ ( 294 )
บทความ ( 0 )



สถานะออฟไลน์


Code (PHP)
/*จัดไปอีกเวอร์ชันครับ*/
<?php
session_start();
?>
<!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=windows-874" />
<title>ระบบจัดเก็บเงินการขาดเวร</title>
<script language="javascript" src="javascript/Myjavascript.js"></script>
<link rel="stylesheet" href="css/Mycss.css" />
</head>
<body>
<br />
<br />
<br />
<br />
<br />
<br />
<form id="form1" name="form1" method="post" action="" onsubmit="return check_login()">
  <table width="377" height="278" border="0" align="center" cellpadding="0" cellspacing="1" class="formlogin">
    <tr>
      <td align="center" valign="middle" background="image/bg1.gif"><br />
          <br />
        <table width="66%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td width="34%" align="right" valign="middle" class="font">UserName:</td>
          <td width="66%" align="left" valign="top"><input name="fname" type="text" class="textfile" id="id_stu" onfocus="highlight(this)" onblur="dehighlight(this)" maxlength="11"/></td>
        </tr>
        <tr>
          <td align="right" valign="middle" class="font">Password:</td>
          <td align="left" valign="middle"><input name="password" type="password" class="textfile" id="id_stu2" onfocus="highlight(this)" onblur="dehighlight(this)" maxlength="11"/></td>
        </tr>
        <tr>
          <td colspan="2" align="center" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
            <input name="Submit" type="submit" class="button" value="เข้าระบบ" />
            <input name="Submit2" type="reset" class="button" value="ยกเลิก" /></td>
          </tr>
        <tr>
          <td colspan="2" align="center" valign="middle" class="fontlink">&nbsp;</td>
        </tr>
      </table></td>
    </tr>
  </table>
</form>
</body>
</html>
<?php
if(isset($_POST['Submit'])){
           $_POST['fname']=trim($_POST['fname']);
		   $_POST['password']=md5(trim($_POST['password']));
	             if(($_POST['fname']=='admin') and($_POST['password']=='62bc16b8c31b4364c9924282759f52ef')){
	                         $_SESSION['fname']=$_POST['fname'];			          
						      $_SESSION['password']=$_POST['password'];/*กำหนด session นะครับ*/
							echo"<script>window.location='../dst/code/main.php'</script>";
				 }else{
				           echo 'Pass Access!!! ';
				 }
}
?>


Date : 2010-07-03 09:48:56 By : sleepington
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ขอดู code login หน่อยครับ ผมขอดู code ตัวอย่างการ login เข้าสู๋ระบบหน่อยครับ ขอบคุณมากครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่