เขียนโค้ดอับโหลดเพลงมา แต่เพลงฟังไม่ได้ แลล้วก้อไม่ขึ้นหน้าดาวโหลดเพลงด้วยค่ะ ทำไงค่ะ ทำเว็บบอร์ด ที่สามารถโหลดเพลงได้ด้วยประมานนี้อ่ะค่ะ
<? include"header.php";?>
<?
$id_qp=$_POST[id_q];
$detail=$_POST[detail];
$btn_add=$_POST[btn_add];
if($btn_add){
if($detail!="" && $name!=""){
$file_post=upimg($_FILES['fileField'],"music/");
$sql="INSERT INTO `tb_wba` (`id` ,`id_q` ,`detail` ,`file_post` ,`member` ,`date_post` ,`status` )VALUES (NULL , '$id_qp', '$detail', '$file_post', '$sess_username', '$date_time_now', '1');";
mysql_db_query($dbname,$sql);
$text_event="<script type='text/javascript'>alert('บันทึกเรียบร้อยแล้ว');</script>";
}else{
$text_event="<script type='text/javascript'>alert('กรุณาใส่ข้อมูลให้ครบถ้วน');</script>";
}
}
?>
<table width="901" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="687" height="702" align="center" valign="top" bgcolor="#F0F0F0"><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<?
echo"$text_event";
$id_q=$_GET[id_q];
$sql_u="UPDATE `tb_wbq` SET `count` =count+1 WHERE `id` =$id_q LIMIT 1 ;";
mysql_db_query($dbname,$sql_u);
$sql_q="SELECT * FROM `tb_wbq` where id='$id_q' ";
$res_q=mysql_db_query($dbname,$sql_q);
$row_q=mysql_fetch_row($res_q);
$id_q=$row_q[0];
?>
<?
$sql_pro="select * from tb_wbt where id=$_SESSION[sess_tw]";;
$res_pro=mysql_db_query($dbname,$sql_pro);
$row_pro=mysql_fetch_row($res_pro);
$id_topic=$row_pro[1];
?>
<table width="660" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="left" class="edit"><a href="webboard_t.php">เว็บบอร์ด</a>-> <a href="webboard.php"><?=$id_topic?></a>-><? $topicc=checkbanword($row_q[2]); echo"$topicc";?></td>
</tr>
</table>
<br />
<table width="660" border="1" cellpadding="3" cellspacing="0" bordercolor="#990000">
<tr>
<td width="650" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff" class="wbq_h"><? $topicc=checkbanword($row_q[2]); echo"$topicc";?></td>
</tr>
<tr>
<td width="650" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"class="wbq_b"><? $detail=checkbanword($row_q[3]); echo"$detail";?></td>
</tr>
<? if($row_q[4]){?>
<tr>
<td width="650" height="1" align="center" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"class="wbq_b">
<embed src="music/<?=$row_q[4]?>" width="650" height="32" autostart="false" ></embed></td>
</tr>
<? }?>
<tr>
<td width="650" height="1" align="left" bordercolor="#D6D6D6" bordercolorlight="#D6D6D6" bordercolordark="white" bgcolor="#D6D6D6" class="wbq_b">โดย <span class="wbq_n"><?=$row_q[5]?></span> วันที่ <span class="wbq_d"><?=$row_q[6]?> </span>| <span class="wba_b">
<? if($chk==1){ ?>
<span class="del"><a href="music/<?=$row_q[4]?>" target="_blank">Download...</a></span>
<? }?>
</span></td>
</tr>
</table>
<span class="logo"><br />
<u> ร่วมตอบคำถาม </u><br />
<br />
</span>
<?
$sql_a="SELECT * FROM `tb_wba` where id_q='$id_q' order by date_post desc ";
$res_a=mysql_db_query($dbname,$sql_a);
$num=mysql_num_rows($res_a);
while($row_a=mysql_fetch_row($res_a)){
?>
<table width="660" border="1" cellspacing="0" cellpadding="3" bordercolor="#993300">
<tr>
<td width="650" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"><strong>คำตอบที่
<?=$num?>
.</strong> <?=$row_a[2]?></td>
</tr>
<? if($row_a[3]){?>
<tr>
<td width="650" height="1" align="center" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"class="wbq_b">
<embed src="music/<?=$row_a[3]?>" width="650" height="32" autostart="false" ></embed></td>
</tr>
<? }?>
<tr>
<td width="650" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#EFEEED" class="wba_b"> <strong>โดย</strong> <span class="wba_n"><?=$row_a[4]?></span> <strong>วันที่</strong> <span class="wba_d"><?=$row_a[5]?></span> <? if($chk==1){ ?> <span class="del"><a href="music/<?=$row_a[3]?>"></a></span> <? }?></td>
</tr>
</table>
<br />
<? $num--; }
if($num==0){
echo"ยังไม่มีใครร่วมตอบคำถาม";
}
?>
<br />
<? if($chk==1){?>
<form action="webboard_a.php?id_q=<?=$id_q?>" method="post" enctype="multipart/form-data" name="form_wba" id="form_wba">
<table width="660" border="1" cellspacing="2" cellpadding="3" bordercolor="#996600">
<tr>
<td colspan="2" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="94%" align="left" ><strong class="sho_date">ร่วมแสดงความคิดเห็น</strong></td>
<td width="6%" align="center" class="del"> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="89" height="1" align="right" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff" >ความคิดเห็น<br /></td>
<td width="547" height="1" align="left" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"><label>
<textarea name="detail" cols="70" rows="5" class="bla12" id="detail"></textarea>
<div id="detail_ver"></div>
</label></td>
</tr>
<tr>
<td height="1" colspan="2" align="center" bordercolor="#000000" bordercolorlight="white" bordercolordark="white" bgcolor="#ffffff"><label>
<input type="hidden" name="id_q" id="id_q" value="<?=$id_q?>" />
<input type="submit" name="btn_add" id="btn_add" value="ตอบคำถาม" />
<input name="name" type="hidden" id="name" size="30" value="<?=$sess_username?>" />
</label></td>
</tr>
</table>
</form><? }?><br />
<br />
</td>
<td width="205" align="center" valign="top" bgcolor="#999999"><? include"baner_free.php";?></td>
</tr>
</table>
<? include"foot.php";?>
</body>
</html>Tag : PHP, CakePHP
Date :
2010-10-06 04:09:18
By :
nana
View :
839
Reply :
1
อยากจะช่วยน่ะครับ แต่ไม่รู้จะให้ช่วยดูตรงไหนน่ะครับ
Date :
2010-10-06 10:22:17
By :
webmaster
Load balance : Server 02