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 > error ครับช่วยเช็คให้หน่อยครับว่า เกิดมากจากอะไร เพราะว่าเวลา logon แล้วบอกว่ากรอบข้อมุลไม่ครบ ช่วย



 

error ครับช่วยเช็คให้หน่อยครับว่า เกิดมากจากอะไร เพราะว่าเวลา logon แล้วบอกว่ากรอบข้อมุลไม่ครบ ช่วย

 



Topic : 033160

Guest




Code (PHP)
<?
$db_name="project";
mysql_connect("localhost","root","1234");
mysql_select_db($db_name) or die("Could not Connect");

//$uname='admin';
//$pwd='admin';

//$uname='staff';
//$pwd='staff';

//$uname=46066318;
//$pwd=46066318;

//$uname='spk';
//$pwd='spk';

// session start
if ($uname<>"" and $pwd<> "")
{
	$sql_cmd="select * from account where username='$uname' and password ='$pwd'";
	//echo $sql_cmd;
	$result = mysql_db_query($db_name, $sql_cmd);
	$num_rows = mysql_num_rows($result);
	if($num_rows>0)
	{
		$rs = mysql_fetch_array($result);
		$level=$rs[Privilege];
		$Account_id=$rs[Account_id];
		//echo $rs[ACCOUNT_ID] . "  " . $rs[PRIVILEGE];
		echo "<center>Please wait ...</center>";
		if($level==1)
		{
			//$webpage="../admin/main_admin.php";
			//header("Location : http://localhost/root/admin/main_admin.php");
			echo "<meta http-equiv = refresh ; content = '3 ; url=../admin/main_admin.php'>:";
		}
		if($level==2)
		{
			//$webpage="../officer/main_user.php";
			echo "<meta http-equiv = refresh ; content = '3 ; url=../officer/main_user.php'>:";
		}
		if($level==3)
		{
			$sql_cmd="select stud_id from student where account_id=$account_id";
			//echo $sql_cmd;
			$result = mysql_db_query($db_name, $sql_cmd);
			$num_rows = mysql_num_rows($result);
			$rs = mysql_fetch_array($result);
			echo "<meta http-equiv = refresh ; content = '3 ; url=../stud/main_student.php?stud_id=$rs[stud_id]'>:";

			//have sesion
		}
		if($level==4)
		{
			$sql_cmd="select prof_id from professor where account_id=$account_id";
			//echo $sql_cmd;
			$result = mysql_db_query($db_name, $sql_cmd);
			$num_rows = mysql_num_rows($result);
			$rs = mysql_fetch_array($result);
			echo "<meta http-equiv = refresh ; content = '3 ; url=../prof/main_professor.php?prof_id=$rs[prof_id]'>:";

			//have sesion
		}
	}	
	else
	{
		echo "<center>¡ÃÍ¡ username ËÃ×Í password äÁè¶Ù¡µéͧ";
		echo "<br><a href =\"../login.html\">back</a></center>";
	}	
}
else
{
echo "<center>¡ÃÍ¡¢éÍÁÙÅäÁè¤Ãº";
echo "<br><a href =\"../login.html\">back</a></center>";
}
?>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-10-16 16:06:17 By : tui View : 931 Reply : 6
 

 

No. 1



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

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

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


ลองเช็คเรื่องปีกกา

กับเรื่อง if else ครับ






Date : 2009-10-16 16:43:07 By : onizike
 


 

No. 2



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

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

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


Quote:
เพราะว่าเวลา logon แล้วบอกว่ากรอบข้อมุลไม่ครบ


มันบอกว่ากรอกข้อมูลไม่ครบหรอครับ งั้นกรอกให้่ครบครับ

Code (PHP)
$uname<>"" and $pwd<> "" // รับค่ามาจากไหนหรอครับ ดูแล้วไม่เห็นจะมีการรับค่ามาเลย

Date : 2009-10-16 16:50:45 By : pokultra
 

 

No. 3



โพสกระทู้ ( 1,528 )
บทความ ( 1 )

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

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


Code (PHP)
//$uname='admin';
//$pwd='admin';

ปิดไว้นี่คือ ส่งค่ามาจากหน้าอื่นแล้วใช่มั้ยครับ แล้ว echo ออกมาแล้วได้อารายอะคราบ


Date : 2009-10-16 16:51:37 By : Sek-Artdrinker
 


 

No. 4

Guest


อยากรู้อะไร add เด๊ยวจัดให้ [email protected]
Date : 2009-10-16 17:24:51 By : don
 


 

No. 5



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

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

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


ถามดวงชะตาด้วยได้ป่ะครับ
Date : 2009-10-16 17:28:28 By : pokultra
 


 

No. 6

Guest


ผมมีรูปฐานข้อมูลมาให้ดูครับแล้วก็ code หน้า login มาด้วยครับ


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Login/Register</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.style1 { color: #FF3300;
font-weight: bold;
}
-->
</style>
</head>

<body leftmargin="0" topmargin="0">
<div id="Layer1" style="position:absolute; left:63px; top:311px; width:15px; height:20px; z-index:1"><img src="images/login.gif" width="24" height="24"></div>
<div id="Layer2" style="position:absolute; left:25px; top:339px; width:99px; height:22px; z-index:2"><font color="#FF3300" size="2" face="Microsoft Sans Serif">
<strong><a href="login.html">Login/Register</a></strong></font></div>
<div id="Layer4" style="position:absolute; left:637px; top:152px; width:105px; height:40px; z-index:4"><strong>Member
Login:</strong><br>
<img src="images/forumlist.gif" width="18" height="9">
<strong><font color="#0033CC">Go</font> <font color="#FF3300">back.</font></strong><br>
</div>
<div id="Layer5" style="position:absolute; left:213px; top:149px; width:85px; height:46px; z-index:5">
<p><img src="images/icon_register.gif" width="28" height="25"><br>
<font color="#FF3300"><strong>Register :</strong></font></p>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/index4_02.gif" bgcolor="#6699CC"><font size="1" face="Microsoft Sans Serif"><img src="images/first01.gif" width="361" height="90"></font></td>
</tr>
</table>
<table width="772" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="177" height="411" valign="top">
<table width="177" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/first02.gif" width="177" height="16"></td>
</tr>
<tr>
<td width="177" height="179" valign="top" background="images/menu03.gif">
<table width="90%" height="62" border="0" align="center" cellpadding="0" cellspacing="3">
<tr>
<td height="17"><font size="1" face="Microsoft Sans Serif"><img src="images/icon.gif" width="14" height="14"> <strong>MENU &gt;&gt;</strong></font></td>
</tr>
<tr>
<td><p><font size="1" face="Microsoft Sans Serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ <a href="home.html" target="_self">HOME</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ <a href="webboard/test.html">WEBBOARD</a><br>
&nbsp;&nbsp;&nbsp; &nbsp;+ <a href="login.html" target="_self">PROJECT MANAGEMENT</a><br>
&nbsp;&nbsp;&nbsp; &nbsp;+ <a href="http://www.it.kmutt.ac.th" target="_self">IT KMUTT</a><br>
&nbsp;&nbsp;&nbsp; &nbsp;+ <a href="http://www.kmutt.ac.th" target="_self">KMUTT</a></font></p></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="1" background="images/line.gif"><img src="images/line.gif" width="1" height="3"></td>
<td valign="top"><table width="95%" height="394" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><font color="#0000FF" size="2" face="Microsoft Sans Serif"><strong>PROJECT
<font color="#FF0000">MANAGMENT</font></strong></font></td>
</tr>
<tr>
<td><font size="1" face="Microsoft Sans Serif"><span class="style1">WEBBOARD ==&gt;</span>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="webboard/webboard.php?Category=data">DATA</a> &nbsp;|&nbsp;&nbsp;<a href="webboard/webboard.php?Category=software">SOFTWARE</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="webboard/webboard.php?Category=itm" target="_self">ITM</a></font></td>
</tr>
<tr>
<td height="347">
<form action="include/authen.php" method="post">
<table width="100%" height="280" border="1" cellpadding="0" cellspacing="2">
<tr bgcolor="#0000FF">
<td height="14"><font color="#FFFFFF" size="1" face="Microsoft Sans Serif"><strong>Login/Register
:-</strong></font></td>
</tr>
<tr>
<td height="258">
<div id="Layer3" style="position:absolute; left:310px; top:183px; width:314px; height:186px; z-index:3; background-color: #33CCFF; layer-background-color: #33CCFF; border: 1px none #000000;">
<div align="center">
<p><strong><font color="#FF3333"><br />
Sign In</font></strong></p>
<p align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Username
:
<input name="uname" type="text" id="uname" />
</strong></p>

<p align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Password
&nbsp;:<font color="#FF3333">
<input name="pwd" type="password" id="pwd" />
</font></strong></p>

<table width="41%" border="0" align="center">
<tr>
<td width="43%" height="27"> <div align="center">
<input type="submit" name="Submit" value="OK" />
</div></td>
<td width="57%"> <div align="center">
<input type="reset" name="reset" value="Cancel" />
</div></td>
</tr>
</table>

</div>
</div>
<font size="1" face="Microsoft Sans Serif"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></td>
</tr>
</table>
</form>
<p align="right"><font size="1" face="Microsoft Sans Serif"><br>
</font><font color="#CCCCCC" size="1" face="Microsoft Sans Serif">Copyright
2003. All rights reserved. Use for project only.<br>
Designed by Sukkler team For technical assistance call: <br>
For help through e-mail:[email protected]</font><font size="1" face="Microsoft Sans Serif"><br>
</font></p></td>
</tr>
<tr>
<td height="19">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td height="21" colspan="3">
<hr align="center" width="100%"></td>
</tr>
</table>
</body>
</html>
Date : 2009-10-16 18:12:56 By : tui
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : error ครับช่วยเช็คให้หน่อยครับว่า เกิดมากจากอะไร เพราะว่าเวลา logon แล้วบอกว่ากรอบข้อมุลไม่ครบ ช่วย
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 03
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 อัตราราคา คลิกที่นี่