Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > PHP > PHP Forum > Parse error: parse error, unexpected T_ELSE in โปรเจคจบคร๊าบ


[PHP] Parse error: parse error, unexpected T_ELSE in โปรเจคจบคร๊าบ

 
Topic : 051726



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์



Parse error: parse error, unexpected T_ELSE in C:\AppServ\www\com_buss\function.php on line 42

Code (PHP)
01.<? function dateShow($datetime){
02.    $monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
03.    $monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");
04. 
05.        $tmpSplit = split(" ",$datetime);
06.        $datadate = $tmpSplit[0];
07.        $datatime = $tmpSpilt[1];
08.                 
09.            $splitDate = split("-",$datadate);
10.            $output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
11.    return $output;
12.}
13.    function showIP($ipaddress){
14.        if($ipaddress<>"::1"){
15.            $tmpSplit = split("\.",$ipaddress);
16.            $output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
17.    } else {
18.        $output = "127.0.0.xxx";
19.    }
20.        return $output;
21.    }
22.    function showAttachfile($imagename){
23.        if($imagename<>""){
24.            $imagesize = getimagesize("attach/imagename.jpg");
25.            if($imagesize[0]>$imagesize[1]){
26.            if($imagesize[0]>$imagesize[1]){
27.             
28.                if ($imagesize[0] > 150) {
29.                    $w = 150;
30.                    $h = ($imagesize[1]*150)/$imagesize[0];
31.                }else{
32.                    $w = $imagesize[0];
33.                    $h = $imagesize[1];
34.                    }
35.                }else{
36.                    if($imagesize[0] > 150) {
37.                        $h = 150;
38.                        $w = ($imagesize[0]*150)/$imagesize[1];
39.        }else{
40.                        $w = $imagesize[0];
41.                        $w = ($imagesize[0]*150)/$imagesize[1];
42.        }else{
43.                        $w = $imagesize[0];
44.                        $h = $imagesize[1];
45.                    }
46.                }
47. 
48.    $output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
49. 
50.        }else{
51.                    $output = "&nbsp;";
52.                }
53.                return $output;
54.            }
55.        function showEmo($detail) {
56.            for($i=1;$i<=15;$i++) {
57.                $detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
58.            }
59.                }
60.?>
61.                    




Tag : PHP



ประวัติการแก้ไข
2010-11-16 02:07:25
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-11-16 01:43:33 By : kooy2828 View : 1144 Reply : 23
 

 

No. 1



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


else ซ้ำกันเพียบเลยครับ เช็คดีๆ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 01:54:51 By : PlaKriM
 

 

No. 2



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


คือว่าผม ทำตามหนังสือครับ ในนั้นมันมีเท่านี้ครับ ผมก็ งงๆ

ช่วยชี้แนะหน่อยนะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 01:59:24 By : kooy2828
 

 

No. 3

Guest


} germ ma 1 tou krub
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 03:51:24 By : mystudent
 

 

No. 4



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


จริงๆ ไม่เกินหรอก มันดูยาก เลยมองผิด มันขาด }

Code (PHP)
01.function showAttachfile($imagename){
02.    if($imagename<>""){
03.        $imagesize = getimagesize("attach/imagename.jpg");
04.        if($imagesize[0]>$imagesize[1]){
05.            if($imagesize[0]>$imagesize[1]){
06.         
07.                if ($imagesize[0] > 150) {
08.                    $w = 150;
09.                    $h = ($imagesize[1]*150)/$imagesize[0];
10.                }else{
11.                    $w = $imagesize[0];
12.                    $h = $imagesize[1];
13.                }
14.            }else{
15.                if($imagesize[0] > 150) {
16.                    $h = 150;
17.                    $w = ($imagesize[0]*150)/$imagesize[1];
18.                }else{
19.                    $w = $imagesize[0];
20.                    $w = ($imagesize[0]*150)/$imagesize[1];
21.                }
22.            }else{
23.                $w = $imagesize[0];
24.                $h = $imagesize[1];
25.            }
26.        }
27. 
28.        $output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
29. 
30.    }else{
31.        $output = "&nbsp;";
32.    }
33.    return $output;
34.}

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 07:04:33 By : PlaKriM
 

 

No. 5



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ไม่ได้ครับ เหมือนเดิมเลย แค่ขยับบรรทัดที่เออเร้อไป
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 12:37:39 By : kooy2828
 

 

No. 6



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ใครก็ได้ช่วยชี้แนะโค๊ตนี้หน่อยนะครับ

ขอความกรุณาด้วย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 21:35:13 By : kooy2828
 

 

No. 7



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


บรรทัดไหนละครับ คุณเอาโค๊ดมาหมดแล้วหรอ บางทีอาจจะมี if อะไรอยู่บนๆ มันต้องไล่ปิดให้ครบให้ถูกต้องครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 22:02:38 By : PlaKriM
 

 

No. 8



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


บรรทัดที่ 42 ครับ พอใส่ตามที่แนะนำ มันก็เป็น43

}else{
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 22:21:41 By : kooy2828
 

 

No. 9



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


function showAttachfile($imagename){
if($imagename<>""){
$imagesize = getimagesize("attach/imagename.jpg");
if($imagesize[0]>$imagesize[1]){
if($imagesize[0]>$imagesize[1]){

if ($imagesize[0] > 150) {
$w = 150;
$h = ($imagesize[1]*150)/$imagesize[0];
}else{
$w = $imagesize[0];
$h = $imagesize[1];
}
}else{
if($imagesize[0] > 150) {
$h = 150;
$w = ($imagesize[0]*150)/$imagesize[1];
}else{
$w = $imagesize[0];
$w = ($imagesize[0]*150)/$imagesize[1];
}
}else{
$w = $imagesize[0];
$h = $imagesize[1];
}
}

$output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";

}else{
$output = "&nbsp;";
}
return $output;
}

มี elseif ไหมครับ นี่มัน else แล้ว else อีก จะ else ไปไหนเนี้ย
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 22:31:49 By : PlaKriM
 

 

No. 10



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ผมทำตามหนังสือครับ มันติดหน้านี้หน้าเดียวเลยครับ


ยังไงช่วยชี้แนะหน่อยนะครับ ตัดหรือเพิ่ม เปลี่ยนรูปแบบก็ได้ครับ ขอให้ใช้ได้พอครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 22:33:32 By : kooy2828
 

 

No. 11



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


เอานี่ออกละกัน คงไม่เพี่ยนหรอกมั้งงงงงงงงงงงง

}else{
$w = $imagesize[0];
$h = $imagesize[1];
}
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 22:38:46 By : PlaKriM
 

 

No. 12



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


เอาออกแล้วก็ยัง Parse error: parse error, unexpected T_ELSE in C:\AppServ\www\com_buss\function.php on line 46

Code (PHP)
01.<? function dateShow($datetime)
02.{
03.    $monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
04.    $monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");
05. 
06.        $tmpSplit = split(" ",$datetime);
07.        $datadate = $tmpSplit[0];
08.        $datatime = $tmpSpilt[1];
09.                 
10.            $splitDate = split("-",$datadate);
11.            $output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
12.    return $output;
13.}
14.    function showIP($ipaddress){
15.        if($ipaddress<>"::1"){
16.            $tmpSplit = split("\.",$ipaddress);
17.            $output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
18.    } else {
19.        $output = "127.0.0.xxx";
20.    }
21.        return $output;
22.    }
23.    function showAttachfile($imagename){
24.        if($imagename<>""){
25.            $imagesize = getimagesize("attach/imagename.jpg");
26.            if($imagesize[0]>$imagesize[1]){
27.            if($imagesize[0]>$imagesize[1]){
28.             
29.                if ($imagesize[0] > 150) {
30.                    $w = 150;
31.                    $h = ($imagesize[1]*150)/$imagesize[0];
32.                }else{
33.                    $w = $imagesize[0];
34.                    $h = $imagesize[1];
35.                    }
36.                }else{
37.                    if($imagesize[0] > 150) {
38.                        $h = 150;
39.                        $w = ($imagesize[0]*150)/$imagesize[1];
40.                    }else{
41.                        $w = $imagesize[0];
42.                        $w = ($imagesize[0]*150)/$imagesize[1]; 
43.                     
44.                }
45.                    $output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
46.                } else {
47.                    $output = "&nbsp;";
48.                }
49.                return $output;
50.            }
51.        function showEmo($detail) {
52.            for($i=1;$i<=15;$i++) {
53.                $detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
54.             
55.                }
56.                }
57.?>
58.                 
59.                 
60.                 
61.                 
62.                 
63.                 
64.                 
65.                 
66.                 
67.                 
68.                 
69.                 
70.                 
71.                    

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 23:40:05 By : kooy2828
 

 

No. 13



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


กรรม น่าจะสังเกตุหน่อยว่าผมบอกผิด

เอาออกแค่นี้ครับ
}else{
$w = $imagesize[0];
$h = $imagesize[1];
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 23:47:32 By : PlaKriM
 

 

No. 14



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


Parse error: parse error, unexpected $end in C:\AppServ\www\com_buss\function.php on line 57
Code (PHP)
01.<? function dateShow($datetime)
02.{
03.    $monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
04.    $monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");
05. 
06.        $tmpSplit = split(" ",$datetime);
07.        $datadate = $tmpSplit[0];
08.        $datatime = $tmpSpilt[1];
09.                 
10.            $splitDate = split("-",$datadate);
11.            $output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
12.    return $output;
13.}
14.    function showIP($ipaddress){
15.        if($ipaddress<>"::1"){
16.            $tmpSplit = split("\.",$ipaddress);
17.            $output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
18.    } else {
19.        $output = "127.0.0.xxx";
20.    }
21.        return $output;
22.    }
23.    function showAttachfile($imagename){
24.        if($imagename<>""){
25.            $imagesize = getimagesize("attach/$imagename.jpg");
26.            if($imagesize[0]>$imagesize[1]){
27.            if($imagesize[0]>$imagesize[1]){
28.             
29.                if ($imagesize[0] > 150) {
30.                    $w = 150;
31.                    $h = ($imagesize[1]*150)/$imagesize[0];
32.                }else{
33.                    $w = $imagesize[0];
34.                    $h = $imagesize[1];
35.                    }
36.                }else{
37.                    if($imagesize[0] > 150) {
38.                        $h = 150;
39.                        $w = ($imagesize[0]*150)/$imagesize[1];
40.                    }else{
41.                        $w = $imagesize[0];
42.                        $w = ($imagesize[0]*150)/$imagesize[1]; 
43.                     
44.                        }
45.                }
46.                    $output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
47.                } else {
48.                    $output = "&nbsp;";
49.                }
50.                return $output;
51.            }
52.        function showEmo($detail) {
53.            for($i=1;$i<=15;$i++) {
54.                $detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
55.                }
56.                }                      
57.?>




จากเออเร้อคือ สัญลักณ์ตอนจบใช่มั้ยครับ ผม งง กับบรรทัดครับ มันปิด ?> แบบมะใช่หรอครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-16 23:57:52 By : kooy2828
 

 

No. 15



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


OK
ไปเช็ค syntax มาให้ละ

Code (PHP)
01.function dateShow($datetime){
02.    $monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
03.    $monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");
04. 
05.        $tmpSplit = split(" ",$datetime);
06.        $datadate = $tmpSplit[0];
07.        $datatime = $tmpSpilt[1];
08.                 
09.            $splitDate = split("-",$datadate);
10.            $output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
11.    return $output;
12.}
13.function showIP($ipaddress){
14.    if($ipaddress<>"::1"){
15.        $tmpSplit = split("\.",$ipaddress);
16.        $output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
17.    } else {
18.        $output = "127.0.0.xxx";
19.    }
20.    return $output;
21.}
22.function showAttachfile($imagename){
23.    if($imagename<>""){
24.        $imagesize = getimagesize("attach/imagename.jpg");
25.        if($imagesize[0]>$imagesize[1]){
26.         
27.            if ($imagesize[0] > 150) {
28.                $w = 150;
29.                $h = ($imagesize[1]*150)/$imagesize[0];
30.            }else{
31.                $w = $imagesize[0];
32.                $h = $imagesize[1];
33.            }
34.        }else{
35.                if($imagesize[0] > 150) {
36.                    $h = 150;
37.                    $w = ($imagesize[0]*150)/$imagesize[1];
38.                }else{
39.                    $w = $imagesize[0];
40.                    $w = ($imagesize[0]*150)/$imagesize[1];
41.                }
42.        }
43. 
44.        $output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
45. 
46.    }else{
47.                $output = "&nbsp;";
48.    }
49.    return $output;
50.}
51.function showEmo($detail) {
52.    for($i=1;$i<=15;$i++) {
53.        $detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
54.    }
55.}

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:07:38 By : PlaKriM
 

 

No. 16



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบพระคุณมากครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:12:48 By : kooy2828
 

 

No. 17



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


พอดีเจอนี้เข้า ช่วยอธิบายนิดครับ

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desclimit ,10' at line 1
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:15:29 By : kooy2828
 

 

No. 18



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


desclimit เคาะวรรคด้วยครับ desc limit
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:25:14 By : PlaKriM
 

 

No. 19



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ลองแล้วครับ เหมือนเดิม ฝากช่วยดูอีกนิดนะครับ

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1

Code (PHP)
001.<? session_start(); ?>
002.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
003.<html xmlns="http://www.w3.org/1999/xhtml">
004.<head>
005.<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
006.<title>Webbord</title>
007.<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
008.<script language="javascript">
009.    function addEmo(num){
010.        document.frmTopic.detail.value = document.frmTopic.detail.value +'['+ num +']';
011.    }
012.    function checkNull(){
013.        if(document.frmTopic.subject.value=="" || document.frmTopic.subject.value==null){
014.            alert('โปรดกรอกชื่อเรื่องด้วยครับ');
015.            document.frmTopic.subject.focus();
016.            return false;
017.        }
018.        if(document.frmTopic.detail.value=="" || document.frmTopic.detail.value==null){
019.            alert('โปรดกรอกรายละเอียดด้วยครับ');
020.            document.frmTopic.detail.focus();
021.            return false;
022.        }
023.        if(document.frmTopic.name.value=="" || document.frmTopic.name.value==null){
024.            alert('คุณลืมชื่อนะครับ');
025.            document.frmTopic.name.focus();
026.            return false;
027.        }
028.        document.frmTopic.submit();
029.    }
030.</script>
031.</head>
032. 
033.<body>
034.    <center><br />
035.    <?  include("connect.php");
036.        include("function.php") ?>
037.<form id="frmManage" name="frmManage"  method="post" action="managewebbord.php">
038.  <table width="1000" class="square" cellpadding="4" cellspacing="1">
039.    <tr>
040.      <td  width="50"    class="square" align="center">&nbsp;</td>
041.      <td width="641"    class="square" align="center">Subject</td>
042.      <td width="201"    class="square" align="center">Date</td>
043.      <td width="76"     class="square" align="center">View</td>
044.      <td width="66"     class="square" align="center">Reply</td>
045.    </tr>
046.    <? $sql = "select * from webboard_post order by question_id desc ";
047.            $query = mysql_query($sql) or die(mysql_error());
048.            $num = mysql_num_rows($query);
049.            $page = isset($_GET['page'])?$_GET['page']:1;
050.            $perpage = 10;
051.            $totalpage = ceil($num/$perpage);
052.            $startpoint = ($page-1)*$perpage;
053.            $sql .= "limit $startpoin,$perpage";
054.            $query = mysql_query($sql) or die(mysql_error());
055.            $num = mysql_num_rows($query);
056.             
057.                if($num>0){
058.                    for($i=0;$i<$num;$i++){
059.                        $row = mysql_fetch_array($query); ?>
060.    <tr>
061.      <td width="50" class="square" align="center">
062.        <? if(!isset($_SESSION['admin'])){ ?> 
063.                        <img src="image/bullet.gif" width="6" height="12" />
064.          <? }else{ ?>
065.                <input type="checkbox" id="id[]" name="id[]" value="<?=$row['question_id']?>" class="verdana" />
066.          <? } ?>
067.     </td>
068.<td width="641" class="square" align="center">
069.            <a href="viewtopic.php?id=<?=$row['question_id']?>"target="_blank"><?=$row['subject']?> </a></td>  
070.<td width="201" class="square" align="center">
071.                    <?=dateShow($row['datadate'])?>    </td>  
072.<td width="76" class="square" align="center">
073.                    <?=$row['view']?>                 </td>
074.<td width="66" class="square" align="center">
075.                    <?=$row['reply']?>                    </td>
076.    </tr>
077.     <? }
078.     } else { ?>
079.      <tr> <td colspan="5" class="square" align="center"> DataBase is emply
080.      </td> </tr>
081.    <? } ?>
082.            <? if($totalpage>0){ ?>
083.    <tr><td colspan="5" class="square" align="center">
084.    <? for($i=1;$i<=$totalpage;$i++){
085.                echo"<a href=\"?page=$i\">$i</a>"; } ?>
086.      </td></tr>
087.     <? } ?>
088.     <? if(isset($_SESSION['admin'])){?>
089.    <tr><td colspan="5" class="square" align="right">
090.        click here for delete <input type="submit" value="Delete" class="verdana" /> :
091.        <a href="logout.php" class="verdana">Logout</a>
092.         </td></tr>
093.      <? } ?>
094.  </table><br/>
095.</form>
096.            <form id="frmtopic" name="frmTopic" enctype="multipart/form-data" method="post" action="inserttopic.php"  onsubmit="checkNull();return false;">
097.<table width="1000" class="square" cellpadding="4" cellspacing="1">
098.    <tr>
099.        <td width="200" class="square" align="center">Subject</td>
100.        <td width="800" class="square" align="left">
101.        <input type="text" id="subject" name="subject" style="width:500px" class="verdana"/>
102.                </td>
103.              </tr>
104.    <tr>
105.        <td width="200" class="square" align="center">Detial</td>
106.        <td width="800" class="square" align="left">
107.            <textarea name="detail" rows="4" class="verdana" id="detail" style="width:500px"></textarea>
108.            </td>
109.           </tr>
110.    <tr>
111.        <td width="200" class="square" align="center">Emo</td>
112.        <td width="800" class="square" align="left">
113.        <? for($i=1;$i<=15;$i++) { ?>
114.                <img src="emo/<?=$i?>.gif" onclick="addEmo(<?=$i?>)" />
115.                <? } ?>
116.            </td>
117.           </tr>
118.    <tr>
119.        <td width="200" class="square" align="center">Attach file</td>
120.        <td width="800" class="square" align="left">
121.        <input type="file" id="attach" name="attach" class="verdana" />
122.        </td>
123.       </tr>
124.        
125.       <td width="200" class="square" align="center">Name</td>
126.       <td width="800" class="square" align="left">
127.       <input type="text" id="name" name="name" style="width:444px" class="verdana" />
128.        
129.       <input type="submit" value="Post" class="verdana" />
130.       </td>
131.      </tr>
132.     </table>
133.  </form>
134.  <? mysql_close($conn); ?>
135.</center>
136.</body>
137.</html>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:35:33 By : kooy2828
 

 

No. 20



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


$startpoint = ($page-1)*$perpage;
$sql .= "limit $startpoin,$perpage";
ดูเอง
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:39:07 By : PlaKriM
 

 

No. 21



โพสกระทู้ ( 23 )
บทความ ( 0 )



สถานะออฟไลน์


ขอขอบพระคุณอย่างสูงเลยครับ
เอาไว้จะมารบกวนใหม่

ขอให้เจริญยิ่งๆ ขึ้นไปนะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2010-11-17 00:46:09 By : kooy2828
 

 

No. 22

Guest


รบกวนถาม insert topic Unknown column 'subject_detail' in 'field list' มันขึ้นที่ไฟล์ inserttopic.php


<? $subject = $_REQUEST['subject'];
$detail = $_REQUEST['detail'];
$attachfile = $_FILES['attach'];
$name = $_REQUEST['name'];
$datadate = date("Y-m-d H:i:s");
$ip_address = $_SERVER['REMOTE_ADDR'];


$newname = "";
if($attachfile['size']>0){
if($attachfile['type']=="image/jpeg" || $attachfile['type']=="image/pjpeg" || $attachfile['type']=="image/gif"){

$newname = time();
move_uploaded_file($attachfile['tmp_name'],"attach/$newname.jpg");
}else{
echo "<script>alert('Upload image file type JPG and GIF only!');history.back();</script>";
exit();
}
}

include("connect.php");
$sql = "insert into webboard_post(subject,datadate,subject_detail,attach_file,name,ip_address,view,reply)";
$sql .= "value('$subject','$datadate','$detail','$newname','$name','$ip_address',0,0)";

mysql_query($sql) or die (mysql_error());
mysql_close($conn);

echo "<script>alert('Insert your question complete.');window.location='index.php';</script>";
?>
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-04-05 10:36:51 By : realgame
 

 

No. 23

Guest


มันไม่รู้จัก ฟิลด์ subject_detail นี้น่ะ
คือฟิลด์นี้มันไม่มีอยู่ในตารางที่คุณทำรายการน่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-04-05 10:47:19 By : บังเอิญผ่านมาเห็น
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : Parse error: parse error, unexpected T_ELSE in โปรเจคจบคร๊าบ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)





ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่