|  | 
	                
  
    | 
	 
        ช่วยหน่อยครับ คือผมนะเว็ป ลงเว็ปHosting แล้วสงสัยว่าทำไมเป็นแบบนี้ งงมากๆ ช่วยหน่อยครับๆ     |  
    |  |  
 
	
		|  |  |  |  |  
		|  |  | 
          
            | ตอนเปิด ด้วยโปรแกรมAPPServ ในเครื่องของ ผม เว็ปสมัครสมาชิกก็ใช้งานได้ พอสมัคร ID Pass ที่สมัครก็เข้าDatabass ได้สำเร็จ แต่พอผมลงเว็ปHosting พอเปิดเว็ปสมัครสมาชิกมันก็ขึ้นงี้อ่าครับ The required module is not enabled on your MSSQL server. Please enable it.
 
 ทำยังไงหรอครับช่วยทีครับ
 
 นี้Code เว็ปสมัครผมครับ
 
 Code (PHP)
 
 <center>
<body background="./im/bg1.gif">
<?php
$MD5Code = ""; //
$dbAddr = 'SVOA1\SQLEXPRESS'; //
$dbUser = 'sa'; //
$dbPass = '123456'; //
$dbName = "ACCOUNT_DBF"; //
$server_name = "Flyff ROBO"; //
$reg_allow = 1; // To turn on registering a write "1"
if(!extension_loaded("mssql")) {
echo "The required module is not enabled on your MSSQL server. Please enable it.";
exit();
}
$link = mssql_connect($dbAddr, $dbUser, $dbPass) or die ("Could not connect to the database. Please check your settings.");
mssql_select_db($dbName, $link);
?>
<!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" dir="ltr" lang="en">
<head>
<title><?php echo ('..:: '.$server_name.' - Registration ::..'); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" /><style type="text/css">
<!--
body {
}
.style2 {font-size: smaller}
-->
</style></head>
<body>
<?php
if ($reg_allow == 1) {
function cleanFormData($text) {
$data = strtolower($text);
$data = trim($text);
$data = htmlentities($text);
$data = strip_tags($text);
return $data;
}
if(isset($_POST['submit'])) {
$userName = cleanFormData($_POST['user']); // Username
$userPass = cleanFormData($_POST['pass']); // Password non-encrypted
$userPass2 = cleanFormData($_POST['pass2']); // Password non-encrypted
$captcha = cleanFormData($_POST['captcha']); // Password non-encrypted
$checkUserName = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE account='".$userName."'");
if(empty($userName) || empty($userPass) || empty($userPass2) || empty($captcha)) {
echo "<b>กรุณากรอกข้อมูลให้ครบ !";
exit();
}elseif(mssql_num_rows($checkUserName) >= 1) {
echo "<b>Account <b>".$_POST['user']."</b> ถูกใช้อยู่.";
exit();
}elseif($_POST['pass'] != $_POST['pass2']) {
echo "<b>รหัสผ่านไม่ตรงกัน.";
exit();
}elseif($_POST['captcha'] != $_POST['captcha_check']) {
echo "<b>คำตอบไม่ถูกต้อง.";
exit();
} else {
$passHash = md5($MD5Code . $userPass);
// Create a new stored prodecure
$stmt = mssql_init("createaccount", $link);
// Bind the field names
mssql_bind($stmt, '@account', $userName, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $passHash, SQLVARCHAR, false, false, 15);
// Execute
mssql_execute($stmt) or die ("Something is wrong on the execution");
// Free statement
mssql_free_statement($stmt);
echo "Account <b>".$_POST['user']."</b> ถูกสร้างเรียบร้อยแล้ว<br><br>เราขอให้คุณสนุกกับ Flyff นะครับ.";
}
} else {
$zahl1 = rand(10,20); //First Number 10-20
$zahl2 = rand(1,10); //Second number 1-10
$operator = rand(1,2); // + Or --
if($operator == "1"){
$operatorzeichen = " + ";
$ergebnis = $zahl1 + $zahl2;
}else{
$operatorzeichen = " - ";
$ergebnis = $zahl1 - $zahl2;
}
$rechnung = $zahl1.$operatorzeichen.$zahl2."              ";
echo'
<form method="post">
<table border="0" cellpadding="0" cellspacing="0" >
<tr><td width="75"><font color="#0066FF" size="3"><b>Account           </font></td><td>            <input type="text" name="user" size="15" maxlenght="15" /></td></tr>
<tr><td><font color="#0066FF" size="3"><br><b>Password         </font></td><td><br />            <input type="password" name="pass" size="17" /></td></tr>
<tr><td><font color="#0066FF" size="3"><br><b>Re-Password   </font></td><td><br />            <input type="password" name="pass2" size="17" /></td></tr>
<tr><td><font color="#0066FF" size="3"><br><b>'.$rechnung.'</font</td><td><br />            <input type="text" name="captcha" size="15" /></td></tr>
<input type="hidden" name="captcha_check" value="'.$ergebnis.'">
</table>
<br>
<tr><td></td><td><input type="submit" name="submit" value="Register" /></td></tr>
</form>';
}
}
else
{
echo '<font color="#9900FF" size="3">ขณะนี้, ยังไม่รับจดทะเบียน!';
exit();
}
?>
</p>
<p>  </p>
</body>
</html>
<script>
<!--
document.write(unescape("%3Cscript%20language%3DJavaScript%3E%0D%0A%3C%21%3E"));
//-->
</script>
<script>
<!--
document.write(unescape("%3Cscript%20language%3D%22JavaScript1.2%22%3E%0D%0A%%0A"));
//-->
</script>
 
 
 Tag : PHP, MySQL, Ms SQL Server 2005, HTML/CSS
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2010-10-04 13:53:02 | By :
                          jomonzainlaum | View :
                          895 | Reply :
                          5 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |  
		|  |  |  |  |  
  
    | 
 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | จาก Error เหมือนกับว่าใช้ function mssql() ไม่ได้ครับ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-10-04 13:55:38 | By :
                            webmaster |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | host ไม่มี mssql ให้ใช้ครับ แล้วทำไม <body> ไปอยู่เหนือ doctype ได้ แถมยัง <center> นั่นอีก ... ลองไป validate html ดูดีมั้ยครับ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-10-04 14:35:04 | By :
                            mr.v |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ช่วยบอกวิธีแก้ไขทีครับ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-10-04 14:35:41 | By :
                            jomonzainlaum |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              |  
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-10-04 14:38:18 | By :
                            SOUL |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |  |