|
|
|
เพิ่ม textarea แล้วข้อมูลมันไม่ลงฐานช่วยดูให้หน่อยนะค่ะ.. |
|
|
|
|
|
|
|
<form action="hd_postmain.php?ppa=1" method="post" enctype="multipart/form-data" name="form2">
<td width="61"><table width="800" border="0" cellspacing="5" cellpadding="0">
<td> </td>
<tr>
<td> </td>
<td align="right"><span class="style5">Thumb pic </span></td>
<td align="center"><span class="style5">:</span></td>
<td><input name="pic" type="file" id="pic" size="45"></td>
<td> </td>
</tr>
<tr>
<td width="1"> </td>
<td width="68" align="right" valign="top"><span class="style5">รายละเอียด</span></td>
<td width="16" align="center" valign="top"><span class="style5">:</span></td>
<td colspan="2"><textarea name="detail" cols="80" rows="15" wrap="OFF" id="detail"></textarea>
<script>editor_generate('detail');</script>
</td>
</tr>
<tr>
<td> </td>
<td width="68" align="right" valign="top"><span class="style5">รายละเอียด</span></td>
<td width="16" align="center" valign="top"><span class="style5">:</span></td>
<td width="657"><textarea name="detailtwo" cols="80" rows="15" wrap="OFF" id="detailtwo"></textarea>
<script>editor_generate('detailtwo');</script>
</td>
<td width="28"> </td>
</tr>
//ตัว detailtwo นี้แหล่ะที่เพิ่มใหม่มันไม่มีข้อมูลในฐาน
<tr>
<td> </td>
<td align="right" class="style5"> </td>
<td align="center" class="style5"> </td>
<td><span class="style5">สามารถชมได้ที่
<input name="radiobutton" type="radio" value="radiobutton" onClick="inlink('1')">
Gallery
<input name="radiobutton" type="radio" value="radiobutton" onClick="inlink('2')">
Article
<input name="radiobutton" type="radio" value="radiobutton" onClick="inlink('3')">
Movie clips
<input name="radiobutton" type="radio" value="radiobutton" onClick="inlink('4')">
Forum
<input name="radiobutton" type="radio" value="radiobutton" checked onClick="inlink('5')">
None </span></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" class="style5"> </td>
<td align="center" class="style5"> </td>
<td><input name="linktotarget" type="text" id="linktotarget" size="80" readonly="true">
<span class="style16">* Read only</span></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" class="style5">Author</td>
<td align="center" class="style5">:</td>
<td width="657"><input name="owner" type="text" id="owner" size="30"></td>
<td width="28"> </td>
</tr>
<tr>
<td> </td>
<td align="right"><span class="style5">Email</span></td>
<td align="center"><span class="style5">:</span></td>
<td><input name="email" type="text" id="email" size="40"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right"><span class="style5">Link</span></td>
<td align="center"><span class="style5">:</span></td>
<td><input name="website" type="text" id="website" size="40"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" class="style5">Title pic </td>
<td align="center" class="style5">:</td>
<td><input name="titlepic" type="file" id="titlepic" size="45">
<span class="style15"> ( <span class="style17"><span class="style18"> *</span><span class="style19">< 700 pixel. </span></span>)</span> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td height="30" align="right"> </td>
<td height="30"> </td>
<td height="40" align="left"><input type="submit" name="Submit" value=" Submit "></td>
<td> </td>
</tr>
</form>
<?php
if(isset($ppa) && $ppa==1){
include("../db_connect.php");
$sql="select * from hd_news order by NEWS_ID DESC limit 0,1";
if(strlen($linktotarget)==0 || $linktotarget=="undefined"){
$urladd="";
}else{
$tg="";
if(substr($linktotarget,0,12)=="hd_viewtopic" || substr($linktotarget,0,9)=="hd_sample"){
$tg=" target=\"_blank\"";
}
$urladd="สามารถรับชมได้ <a href=\"$linktotarget\" $tg>คลิกที่นี่เพื่อรับชม</a>";
}
$detail=$detail.$urladd;
$rs=mysql_db_query($db,$sql);
if($rs){
$nhk=mysql_fetch_array($rs);
$nw=$nhk["NEWS_ID"];
}
$nw++;
$dd=time();
if(substr($pic_type,0,5)=="image"){
$p="../news/".$dd."".$pic_name;
$pc=$dd."".$pic_name;
copy($pic,$p);
$sql="insert into hd_news values('$nw','$owner','$dd','$detail','$detailtwo','$website','$pc','$nt','$email','')";
}else{
$sql="insert into hd_news values('$nw','$owner',$dd','$detail','$detailtwo','$website','defaultpic.jpg','$nt','$email','')";
}
mysql_db_query($db,$sql);
if(substr($titlepic_type,0,5)=="image"){
$pt=$dd."".$titlepic_name;
$sql="update hd_news set MPICTITLE='$pt' where NEWS_ID='$nw'";
$ppt="../news/".$dd."".$titlepic_name;
copy($titlepic,$ppt);
mysql_db_query($db,$sql);
}
}
?>
Tag : - - - -
|
|
|
|
|
|
Date :
23 มิ.ย. 2549 09:15:34 |
By :
ใหม่ |
View :
2377 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
น้องก็โชว์คำสั่ง sql ว่ามีค่าที่กรอกมาหรือเปล่า หรือลองเอาฟังก์ชันออกก่อน เพราะดูโค้ดแล้วน่าจะไม่ผิด
|
|
|
|
|
Date :
24 มิ.ย. 2549 15:11:59 |
By :
nn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณครับ
|
|
|
|
|
Date :
27 มิ.ย. 2549 13:44:49 |
By :
go to web |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณครับ
|
|
|
|
|
Date :
12 ม.ค. 2550 00:42:08 |
By :
aifKzG0AVT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|