|
|
|
อยากได้โคดสำหรับเช็คยูสเซอร์เนมไม่ให้เป็นภาษาไทยและตัวอักษรพิเศษ ตอนสมัครสมาชิกครับ |
|
|
|
|
|
|
|
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=UTF-8" />
<title>Register E-Calender</title>
<link href="style.css" rel="stylesheet" type="text/css" /> <!-- ref style.css extanal -->
</head>
<script type="text/javascript" src="Js/CheckF.js"></script> <!-- Link java Function -->
<?php
if(!isset($_SESSION['login']) )
{
echo "<script>window.location = 'index.php';</script>";
}
date_default_timezone_set('Asia/Bangkok');//set Time Zone Bangkok
$mounth = array("","มักราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฏาคม","สิงหาคม","กันยายน","ตุลาคม","พฤจิกายน","ธันวาคม");
include('connect.php');
$sql = "select * from user where e_user = '".$_SESSION['login']."'";
$query = mysql_query($sql);
$row = mysql_num_rows($query);
$record = mysql_fetch_array($query);
?>
<body>
<form onsubmit="JavaScript:return Cedit();" id="form1" name="form1" method="post" action="editFromsave.php">
<table align="center" bgcolor="#FF66CC" width="400" cellspacing="0" cellpadding="0">
<tr>
<td width="133" align="right">Username:</td>
<td><?php echo $_SESSION['login']; ?></td>
</tr>
<tr>
<td align="right"> </td>
<td> </td>
</tr>
<tr>
<td align="right">New Password:</td>
<td><input type="password" name="password2" /></td>
</tr>
<tr>
<td align="right">Name - Lastname:</td>
<td><input name="name" type="text" value="<?php echo $record['e_name']; ?>"/></td>
</tr>
<tr>
<td align="right">Gender</td>
<td><p>
<input name="gender" type="radio" id="gender" value="male"
<?php if($record['e_gender']== 'male') { echo "checked = 'checked' "; } ?> />Male
<input type="radio" name="gender" value="female" id="gender"
<?php if($record['e_gender']== 'female') { echo "checked = 'checked' "; }?>/>Female
<br />
</p></td>
</tr>
<tr>
<td align="right">เบอร์โทร:</td>
<td>
<label for="day"></label>
<!-- end loop day -->
<label for="mounth"></label> <!-- start loop mounth -->
<!-- ////////////////////////////////////// --><!-- end loop mounth -->
<!-- ////////////////////////////////////// -->
<label for="textfield"></label>
<input type="text" name="tel" id="tel" value="<?php echo $record['e_tel']; ?>" />
<label for="year"></label></td>
</tr>
<tr>
<td align="right"></td>
<td></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="password"/></td>
</tr>
<tr>
<td align="right"><input type="submit" name="submit" id="submit" value="Submit" /></td>
<td> <input type="button" name="back" id="back" value="Cancel" onclick="window.location = 'index.php'" /></td>
</tr>
</table>
</form>
</body>
</html>
อันนี้เป็นโคด หน้า Register ของผมครับ
Tag : PHP, MySQL, HTML/CSS, JavaScript
|
ประวัติการแก้ไข 2014-02-04 00:10:43
|
|
|
|
|
Date :
2014-02-04 00:09:48 |
By :
chakyomac |
View :
932 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|