| 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | นี่คือ config.php คราบลืมไป [<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
 
 <?php
 error_reporting(0);
 //------------???????????????????----------------
 $dbhost = 'localhost';  //?????????
 $dbuser = 'root';  // ???????????
 $dbpass = '';    //???????
 $db_name = 'loc_per'; //????????????
 //-------------------------------------------------------
 //---------???????????????????????????????-----
 $tb_user = "user";
 $tb_gen_pers ="tb_gen_pers";
 $tb_family ="tb_family";
 $tb_type_gen_pers ="tb_type_gen_pers";
 $tb_recorder ="tb_recorder";
 $tb_type_crime_pers ="tb_type_crime_pers";
 $tb_crime_pers ="tb_crime_pers";
 $tb_caractor ="tb_caractor";
 $tb_place ="place";
 $tb_place_cri ="place_cri";
 $tb_type_loca_cri ="type_loca_cri";
 $tb_family_crim ="tb_family_crim";
 $tb_family_cri_cro ="tb_family_cri_cro";
 $tb_tumbon ="tb_tumbon";
 $tb_news ="news";
 $tb_offi_pers ="offi_pers";
 $tb_dep="department";
 $questions="questions";
 $answers="answers";
 $base_pol="base_pol";
 $station="station";
 $bos_tel = "bos_tel";
 
 //----------------ฐานข้อมูลคดีอาญา 5 กลุ่ม
 $g1="g1_name_crim";
 $g2="g2_name_crim";
 $g3="g3_name_crim";
 $g4="g4_name_crim";
 $g5="g5_name_crim";
 $g5_criminal="g5_criminal";
 //-----------------------------------------------------------
 $titleonweb = "::ระบบข้อมูลบุคคลและสถานที่ ตำรวจภูธรจังหวัดนครปฐม::";
 $titlew = "::Web_Board::";
 
 $date=date("Y-m-d");
 $datey = date("Y");
 $timeon=date("h:i:A");
 $title_offi_pers="เพิ่มบุคลากรประจำงาน";
 
 $GTH1=date("dS");
 $GTH2=date("l");
 $GTH3=date("F");
 $GTH4=date("Y")+543;
 $GETG=("$GTH1 $GYH2 $GTH3 $GTH4");
 
 //--------???????????????????????????------------------------
 $conn = mysql_connect ($dbhost, $dbuser, $dbpass);
 /*if(!$conn)
 echo "Connect Error<br>";
 else
 echo "Connect OK<br>";*/
 //------------------------------------------------------------------
 //-------???????????????????????---------------------
 $select_db=mysql_select_db($db_name);
 /*if(!$select_db)
 echo "Select Error<br>";
 else
 echo "Select OK<br>";*/
 mysql_query( "SET NAMES tis620", $conn );
 //---------------------------------------------------------
 $timeformat="j/m/y-h:i";
 $THdt=mktime(gmdate("H")+7,gmdate("i")+4,gmdate("s"),gmdate("m"),gmdate("d"),gmdate("y")); //ค่าวันเวลาสำหรับไทย
 $bkk= mktime(gmdate("H")+7,gmdate("i")+0,gmdate("s"),
 gmdate("m")  ,gmdate("d"),gmdate("Y"));
 $datetimeformat="j/m/y - H:i";
 $now = date($datetimeformat,$bkk) ;
 error_reporting(E_ALL ^ E_NOTICE);  //ตั้งค่ารายงานความผิดพลาด
 
 // ????????????????????????????????????? (????????????? ??? 1024 x 50 == 51200 ???? 50 Kb)
 $config[imgSize_limit] = 51200;
 $config[imgWidth] = 600; //????????????????? ????????????????????...
 
 // ??????????????????????????
 $config[fileSize_limit] = 102400;
 
 $IP = getenv("REMOTE_ADDR");
 $IP = "(".substr($IP,0,strrpos($IP,".")).".*)";
 
 //????? IP Address ??????????????????????
 if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
 $IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
 } else {
 $IP = $_SERVER["REMOTE_ADDR"];
 }
 
 $pagelen = 20;
 $page = $_REQUEST['page'];
 if (empty($page)) { $page=1; }
 
 //????????????????????
 //??????????????????????????????????????????????????????????
 $parth = "c:/appserv/www/ynpt/images_gen";
 $parths = "c:/appserv/www/ynpt/images_crime";
 $parthss = "c:/appserv/www/ynpt/images_loca_gen";
 $parthes = "c:/appserv/www/ynpt/images_loca_cri";
 $p_parthes = "c:/appserv/www/ynpt/picpost";
 $op_parthes = "c:/appserv/www/ynpt/pic_offic_pers";
 
 if($birth_month == "01" || $birth_month == "1")
 {
 $month = "January";
 }
 if($birth_month == "02" || $birth_month == "2")
 {
 $month = "February";
 }
 if($birth_month == "03" || $birth_month == "3")
 {
 $month = "March";
 }
 if($birth_month == "04" || $birth_month == "4")
 {
 $month = "April";
 }
 if($birth_month == "05" || $birth_month == "5")
 {
 $month = "May";
 }
 if($birth_month == "06" || $birth_month == "6")
 {
 $month = "June";
 }
 if($birth_month == "07" || $birth_month == "7")
 {
 $month = "July";
 }
 if($birth_month == "08" || $birth_month == "8")
 {
 $month = "August";
 }
 if($birth_month == "09" || $birth_month == "9")
 {
 $month = "September";
 }
 if($birth_month == "10" || $birth_month == "10")
 {
 $month = "October";
 }
 if($birth_month == "11" || $birth_month == "11")
 {
 $month = "November";
 }
 if($birth_month == "12" || $birth_month == "12")
 {
 $month = "December";
 }
 ?>
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-07-20 19:47:05 | By :
                            geedoo |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ไม่อยากอ่านเยอะ มันขึ้นว่าไรครับถึงเข้าไม่ได้ หรือลอง echo $sql; ออกมาดูนะครับเผื่อช่วยได้ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-07-20 21:16:03 | By :
                            Dragons_first |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ชื่อ input form กับตัวแปรไม่ตรงกันนะ input form  ใช้  username , password
 ส่วนตัวแปรใน sql ใช้  $use_mem , $pass_mem
 ตั้งให้เหมือนกันนะ
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2010-07-20 22:31:07 | By :
                            heng |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |