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,027

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



 

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)
<? function dateShow($datetime){
	$monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	$monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");

		$tmpSplit = split(" ",$datetime);
		$datadate = $tmpSplit[0];
		$datatime = $tmpSpilt[1];
				
			$splitDate = split("-",$datadate);
			$output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
	return $output;
}
	function showIP($ipaddress){
		if($ipaddress<>"::1"){
			$tmpSplit = split("\.",$ipaddress);
			$output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
	} else {
		$output = "127.0.0.xxx";
	}
		return $output;
	}
	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;
			}
		function showEmo($detail) {
			for($i=1;$i<=15;$i++) {
				$detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
			}
				}
?>
					




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 : 1070 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)
	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;
	}

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
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)
<? function dateShow($datetime)
{
	$monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	$monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");

		$tmpSplit = split(" ",$datetime);
		$datadate = $tmpSplit[0];
		$datatime = $tmpSpilt[1];
				
			$splitDate = split("-",$datadate);
			$output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
	return $output;
}
	function showIP($ipaddress){
		if($ipaddress<>"::1"){
			$tmpSplit = split("\.",$ipaddress);
			$output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
	} else {
		$output = "127.0.0.xxx";
	}
		return $output;
	}
	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];  
					
				}
					$output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
				} else {
					$output = "&nbsp;";
				}
				return $output;
			}
		function showEmo($detail) {
			for($i=1;$i<=15;$i++) {
				$detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
			
				}
				}
?>
				
				
				
				
				
				
				
				
				
				
				
				
				
					

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
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)
<? function dateShow($datetime)
{
	$monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	$monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");

		$tmpSplit = split(" ",$datetime);
		$datadate = $tmpSplit[0];
		$datatime = $tmpSpilt[1];
				
			$splitDate = split("-",$datadate);
			$output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
	return $output;
}
	function showIP($ipaddress){
		if($ipaddress<>"::1"){
			$tmpSplit = split("\.",$ipaddress);
			$output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
	} else {
		$output = "127.0.0.xxx";
	}
		return $output;
	}
	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];  
					
						} 
				}
					$output = "<img src=\"attach/$imagename.jpg\" width=\"$w\" height=\"$h\" />";
				} else {
					$output = "&nbsp;";
				}
				return $output;
			}
		function showEmo($detail) {
			for($i=1;$i<=15;$i++) {
				$detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
				}
				}						
?>




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


 

No. 15



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

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

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


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

Code (PHP)
	function dateShow($datetime){
		$monthname = array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
		$monthnum = array("01","02","03","04","05","06","07","08","09","10","11","12");
	
			$tmpSplit = split(" ",$datetime);
			$datadate = $tmpSplit[0];
			$datatime = $tmpSpilt[1];
					
				$splitDate = split("-",$datadate);
				$output = $splitDate[2]."".str_replace($monthnum,$monthname,$splitDate[1])." ".$splitDate[0]." ".$datatime;
		return $output;
	}
	function showIP($ipaddress){
		if($ipaddress<>"::1"){
			$tmpSplit = split("\.",$ipaddress);
			$output = $tmpSplit[0].".".$tmpSplit[1].".".$tmpSpilt[2].".xxx";
		} else {
			$output = "127.0.0.xxx";
		}
		return $output;
	}
	function showAttachfile($imagename){
		if($imagename<>""){
			$imagesize = getimagesize("attach/imagename.jpg");
			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];
					}
			}

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

		}else{
					$output = "&nbsp;";
		}
		return $output;
	}
	function showEmo($detail) {
		for($i=1;$i<=15;$i++) {
			$detail = str_replace("[$1]","<img src=\"emo/$i.gif\" />",$detail);
		}
	}

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
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)
<? session_start(); ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Webbord</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
<script language="javascript">
	function addEmo(num){
		document.frmTopic.detail.value = document.frmTopic.detail.value +'['+ num +']';
	}
	function checkNull(){
		if(document.frmTopic.subject.value=="" || document.frmTopic.subject.value==null){
			alert('โปรดกรอกชื่อเรื่องด้วยครับ');
			document.frmTopic.subject.focus();
			return false;
		}
		if(document.frmTopic.detail.value=="" || document.frmTopic.detail.value==null){
			alert('โปรดกรอกรายละเอียดด้วยครับ');
			document.frmTopic.detail.focus();
			return false;
		}
		if(document.frmTopic.name.value=="" || document.frmTopic.name.value==null){
			alert('คุณลืมชื่อนะครับ');
			document.frmTopic.name.focus();
			return false;
		}
		document.frmTopic.submit();
	}
</script>
</head>

<body>
	<center><br />
    <?  include("connect.php");
		include("function.php") ?>
<form id="frmManage" name="frmManage"  method="post" action="managewebbord.php">
  <table width="1000" class="square" cellpadding="4" cellspacing="1">
    <tr>
      <td  width="50"	class="square" align="center">&nbsp;</td>
      <td width="641" 	class="square" align="center">Subject</td>
      <td width="201" 	class="square" align="center">Date</td>
      <td width="76" 	class="square" align="center">View</td>
      <td width="66" 	class="square" align="center">Reply</td>
    </tr>
    <? $sql = "select * from webboard_post order by question_id desc ";
		  	$query = mysql_query($sql) or die(mysql_error());
		  	$num = mysql_num_rows($query);
		   	$page = isset($_GET['page'])?$_GET['page']:1;
		   	$perpage = 10;
		   	$totalpage = ceil($num/$perpage);
			$startpoint = ($page-1)*$perpage;
			$sql .= "limit $startpoin,$perpage";
			$query = mysql_query($sql) or die(mysql_error());
			$num = mysql_num_rows($query);
			
				if($num>0){
					for($i=0;$i<$num;$i++){
						$row = mysql_fetch_array($query); ?>
    <tr>
      <td width="50" class="square" align="center">
        <? if(!isset($_SESSION['admin'])){ ?>  
						<img src="image/bullet.gif" width="6" height="12" />
          <? }else{ ?>
          		<input type="checkbox" id="id[]" name="id[]" value="<?=$row['question_id']?>" class="verdana" />
          <? } ?>
     </td>
<td width="641" class="square" align="center">
    		<a href="viewtopic.php?id=<?=$row['question_id']?>"target="_blank"><?=$row['subject']?> </a></td>   
<td width="201" class="square" align="center">
					<?=dateShow($row['datadate'])?>    </td>   
<td width="76" class="square" align="center"> 
    				<?=$row['view']?>    				</td>
<td width="66" class="square" align="center"> 
					<?=$row['reply']?> 					</td>
    </tr>
     <? } 
	 } else { ?>
      <tr> <td colspan="5" class="square" align="center"> DataBase is emply 
      </td> </tr>
    <? } ?>
        	<? if($totalpage>0){ ?>
    <tr><td colspan="5" class="square" align="center"> 
	<? for($i=1;$i<=$totalpage;$i++){
		  		echo"<a href=\"?page=$i\">$i</a>"; } ?>
      </td></tr>
     <? } ?>
     <? if(isset($_SESSION['admin'])){?>
    <tr><td colspan="5" class="square" align="right">
    	click here for delete <input type="submit" value="Delete" class="verdana" /> :
        <a href="logout.php" class="verdana">Logout</a>
         </td></tr>
      <? } ?>
  </table><br/>
</form>
			<form id="frmtopic" name="frmTopic" enctype="multipart/form-data" method="post" action="inserttopic.php"  onsubmit="checkNull();return false;">
<table width="1000" class="square" cellpadding="4" cellspacing="1">
	<tr>
    	<td width="200" class="square" align="center">Subject</td>
        <td width="800" class="square" align="left">
        <input type="text" id="subject" name="subject" style="width:500px" class="verdana"/>
        		</td>
              </tr>
  	<tr>
    	<td width="200" class="square" align="center">Detial</td>
        <td width="800" class="square" align="left">
        	<textarea name="detail" rows="4" class="verdana" id="detail" style="width:500px"></textarea>
            </td>
           </tr>
   	<tr>
    	<td width="200" class="square" align="center">Emo</td>
        <td width="800" class="square" align="left">
        <? for($i=1;$i<=15;$i++) { ?>
        		<img src="emo/<?=$i?>.gif" onclick="addEmo(<?=$i?>)" />
                <? } ?>
			</td>
           </tr>
    <tr>
    	<td width="200" class="square" align="center">Attach file</td>
        <td width="800" class="square" align="left">
        <input type="file" id="attach" name="attach" class="verdana" />
        </td>
       </tr>
       
       <td width="200" class="square" align="center">Name</td>
       <td width="800" class="square" align="left">
       <input type="text" id="name" name="name" style="width:444px" class="verdana" />
       
       <input type="submit" value="Post" class="verdana" />
       </td>
      </tr>
     </table>
  </form>
  <? mysql_close($conn); ?>
</center>
</body>
</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 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

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