|
 |
|
ปัญหา MS SQL อ่ะค่ะ...มันขึ้น Eror ว่า Fatal error: Call to undefined function mssql_connect() in |
|
 |
|
|
 |
 |
|
มันขึ้น Eror ว่า
Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\SGBoard\ChkUser.php on line 63
ส่ง code ใก้ดูอ่ะค่ะว่าต้องแก้ตรงไหน
Code (PHP)
<?php
if (!isset($HTTP_POST_VARS) && isset($_POST))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
if (isset($_SESSION))
{
$HTTP_SESSION_VARS = $_SESSION;
}
}
if (@phpversion() < '4.0.0')
{
$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL);
@reset($test);
while (list($input,) = @each($test))
{
while (list($var,) = @each($$input))
{
if (!isset($test[$var]) && $var != 'test' && $var != 'input')
{
unset($$var);
}
}
}
}
else if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
if (!isset($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES);
unset($input['input']);
unset($input['not_unset']);
while (list($var,) = @each($input))
{
if (!in_array($var, $not_unset))
{
unset($$var);
}
}
unset($input);
}
$SH0 =$_POST["SH0"];
$SH5 = $_POST["SH5"];
if(!isset($SH0) || !isset($SH5))
header("location: index.php");
$objConnect = mssql_connect("localhost","sa","") or die("Error Connect to Database");
$objDB = mssql_select_db("EMSaha]");
$strSQL = "SELECT * FROM EMPLOYEE WHERE (SH0 = '$SH0' and SH5 = '$SH5' ) ";
$objQuery = mssql_query($strSQL) or die ("Error Query [".$strSQL."]");
$count = mssql_num_rows($objQuery);
if($count==0){
echo "<script>alert(' ข้อมูลการใช้งานไม่ถูกต้อง..กรุณาตรวจสอบ ');history.back();</script>";
}
else{
$row=mssql_fetch_array($objQuery);
//สร้าง session เพื่อเอาไปป้องกันการlink หน้าเวปนั้นโดยตรง
@session_start();
ob_start();
$_SESSION[sess_userid] = session_id();
$_SESSION["SH0"] = $row["SH0"];
$_SESSION["SH5"] = $row["SH5"];
// เมื่อข้อมูลถูกต้องทั้งหมดแล้ว ให้ไปยังหน้าระบบต่อไปที่ main.php
//echo "<meta http-equiv=refresh content=2;URL=Main.php>";
header("Location: Main.php");
}
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-12-03 15:20:49 |
By :
ตุ๊กตา |
View :
1236 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ของผมทำแล้วยังไม่ได้เลยครับ
Fatal error: Call to undefined function mssql_connect() in
|
 |
 |
 |
 |
Date :
2010-05-25 09:59:37 |
By :
poy213 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|