<?php session_start(); $name = $_SESSION['login']; echo"<center><h3>Welcome user : $customer_name</h3><br>"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> session_start(); <?php mysql_query("SET NAMES UTF8"); $name = $_SESSION['login']; echo"<center><h3>Welcome user : <input type="text" value="<?php echo $name; ?>" /></h3><br>"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php if(empty($_POST['username']) || empty($_POST['password'])){ echo"<b>Fill All Detail </b>"; exit; } else{ $username=$_POST['username']; $password=$_POST['password']; $customer_name=$_POST['customer_name']; $conn=mysql_connect("localhost","root","mysql") or die("could not connect"); mysql_select_db("project") or die ("could not select database"); mysql_query("SET NAMES UTF8"); $query="select * from customer where username='$username' and password='$password' " ; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { $customer_name = $row["customer_name"]; } $result=mysql_query($query) or die(mysql_error()); $count=mysql_num_rows($result); if($count==1){ echo"<b> $customer_name login successfully</b><br>"; $_SESSION['login']= $username; $_SESSION['password']= $password; $_SESSION['customer_name'] = $customer_name; echo"SET Cookie to login:$username,password:$password<br>"; echo"<a href=\"s_user.php\">User detail</a><br>"; echo"<a href =\"s_logout.php\">Logout</a>"; } else{ echo"<b>User $username Authentication Failed<b><br>"; echo"<a href=\"index.php\">login again</a>"; } } ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> session_start(); <?php session_start(); mysql_query("SET NAMES UTF8"); $customer_name = $_SESSION['customer_name']; echo"<center><h3>Welcome user : <input type=\"text\" value=\"" . $customer_name ."\" /></h3><br>"; ?>
<?php session_start(); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php session_start(); mysql_query("SET NAMES UTF8"); $customer_name = $_SESSION['customer_name']; echo"<center><h3>Welcome user : <input type=\"text\" value=\"" . $customer_name ."\" /></h3><br>"; ?>
echo $customer_name = $_SESSION['customer_name']; //ดูว่าเป็นชื่อที่ต้องการหรือยัง
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง