分享:
▼
x0
|
[PHP][討論] 請大大幫幫我...
我目前在寫程式ㄚ.. 我是用 php+mysql+apache+phpmyadmin... 然後..我現在遇到一個很大的問題.... 就是...我從php表單回存進資料庫的資料皆為亂碼... 從資料庫取出來的資料也是亂碼.... 請問我該怎麼解決....
另外...我使用header..... 但他卻出現以下錯誤訊息....
Warning: Cannot modify header information - headers already sent by (output started at C:Program FilesApache GroupApache2htdocsmyphpstudentapplyprocess.php:14) in C:Program FilesApache GroupApache2htdocsmyphpstudentapplyprocess.php on line 28
這是啥意思ㄚ??
以下是我的程式碼...
<? //session_start(); include("connect.php"); //include("config.php"); //CheckId(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <title>申請核准</title> </head>
<body> <? //-->>這裡為14行... $date = date("Y-m-d"); $sql_update = "update absent_info set Absent_Reason = '$reason' , Apply_Date = '$date' where Absent_No = $absent"; $sql_select = mysql_query("select Apply_State from absent_info where Absent_No = '$Absent'"); $state = mysql_fetch_array($sql_select); if($state != 0){ echo "請假編號有誤!!請重新輸入!!";?> <script language="javascript"> alert('請選擇身份!'); history.go(-1); </script> <? } else{ mysql_query($sql_update); header("location:apply_processing.php"); //-->>這裡是28行 } ?> </body> </html>
|