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

HOME > PHP > PHP Forum > ช่วยแก้ หน่อยค่ะ คือว่ามันทำการแก้ไขข้อมูลชุดไม่ได้น่ะค่ะ ช่วยด้วยน่ะค่ะ งานเรา ฮือๆๆๆๆ



 

ช่วยแก้ หน่อยค่ะ คือว่ามันทำการแก้ไขข้อมูลชุดไม่ได้น่ะค่ะ ช่วยด้วยน่ะค่ะ งานเรา ฮือๆๆๆๆ

 



Topic : 080714

Guest




Code (PHP)
<?php
	include "chksession.php";
	include "function.php";
	include "connect.php";
	include "header.php";
	$suite_id=$_GET["suite_id"];
	
	$sql="select * from suite where suite_id='$suite_id'";
	$result=mysql_query($sql, $link);
	$row=mysql_fetch_array($result);
	$type_id=$row['type_id'];
	$suite_size=$row['suite_size'];
	$suite_image=$row['suite_image'];
	$suite_detail=$row['suite_detail'];
	$suite_price_rent=$row['suite_price_rent'];
	$suite_price_cut=$row['suite_price_cut'];

	$sql2="select * from suite_type where type_id='$type_id'";
	$result2=mysql_query($sql2, $link);
	$row2=mysql_fetch_array($result2);
	$type_name=$row2["type_name"];

?>
<table width="1000" border="0" align="center" bgcolor="#FFFFFF">
<tr>
            <td width="10%" height="23" align="left" valign="top" bgcolor="#FF99FF"><?php include "menu1.php";?></td>
<td width="81%" valign="top" bgcolor="#FFFFFF"><table width="68%" border="0" align="center" bgcolor="">
	  <tr>
        			<td width="80%" valign="top"><p>&nbsp;</p>
        			  <center>
					  <p><font face="Angsana New" size="5" color="#000000"><b>แก้ไขข้อมูลชุด</b></font></p>
					  <table border="0" width="100%">

                        <tr align="center">
                          <td width="33%" height="46" valign="top">&nbsp;</td>
                          <img src="../image_suite/detail_edit/<? echo $row[suite_image];?>" /> </tr>
                      </table>
					  </center>
					  <form method="post" action="frm_edit1.php">
					    <table border="1" align='center' cellspacing="0" bordercolor="#999999" bgcolor="#FFFFFF"> 
                      
					 <tr>
					   <td align="right"><p align="left">ประเภทชุด</p></td>
						
						<td>
							&nbsp;&nbsp;<select name="type_id">
                                      <option value="">เลือกประเภทชุด</option>
                                      <?
											$sql = "select * from suite_type";
											$result= mysql_query($sql);
											while($record = mysql_fetch_array($result))
											{
												if($type_id == $record["type_id"])
												{
													$sel = "selected";
												}
												else
												{
													$sel = "";
												}
											?>
                                      <option value="<?=$record["type_id"];?>" <?=$sel;?>>
                                        <?=$record["type_name"];?>
                                      </option>
                                      <?
											}
											?>
                                    </select>&nbsp;<font color="red">*</font>						</td>
					</tr> 
					<tr>
					  <td align="right"><div align="left">รอบอก :&nbsp;&nbsp;</div></td>
						
						<td>&nbsp;&nbsp;<input type="text" name="suite_size" size="20" value="<?php echo $suite_size;?>">&nbsp;<font color="red">*</font></td>
					</tr>

                      <tr>
                        <td align="right"><div align="left">รูปชุด :&nbsp;&nbsp;</div></td>
                        <td>&nbsp;&nbsp;<input type="file" name="suite_image" class="txtbox" value="<?php echo $suite_image;?>">&nbsp;
                        <font color="#CC0000"> * </font></td>
                      </tr>
                      <tr>
									  <td align="left">รายละเอียดชุด :</td>
									  <td align="left"><textarea name="suite_detail" cols="20" rows="4" id="suite_detail"><?=$suite_detail?></textarea></td>
			  			  </tr>
                      <tr>
                        <td align="right"><div align="left">ราคาเช่า :&nbsp;&nbsp;</div></td>
						<td>&nbsp;&nbsp;<input type="text" name="suite_price_rent" size="20" value="<?php echo $suite_price_rent;?>">&nbsp;
                        <font color="#CC0000"> * </font></td>
                      </tr>
                      <tr>
                        <td align="right"><div align="left">ราคาตัด :&nbsp;&nbsp;</div></td>
                        <td>&nbsp;&nbsp;<input name="suite_price_cut" type="text" size="20"value="<?php echo $suite_price_cut;?>">&nbsp;
                            <font color="#CC0000"> * </font></td>
                      </tr>

					
					<tr>
						<td colspan='3' align="center">
							<input type="submit" value="บันทึก">&nbsp;<input type='button' value='ยกเลิก' onClick="javascript:location.href='addsuite.php';">
							<input name="suite_id" type="hidden"  id = "suite_id" value="<?php echo $suite_id;?>" /></td>
					</tr>
				</table>
			</form>		</td>
	</tr>
</table>
	</td>
                        </tr>
                      </table>

        
    <? include "footer.php"; ?>




Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-07-07 18:10:57 By : kam View : 784 Reply : 3
 

 

No. 1

Guest


ฟอร์ม รับ



Code (PHP)
<?php
	 include "chksession.php";
	 include "connect.php"; 
	$suite_id=$_POST['suite_id'];

	$type_id=$_POST['type_id'];
	$suite_size=$_POST['suite_size'];
	$suite_image=$_POST['suite_image'];
	$suite_detail=$_POST['suite_detail'];
	$suite_price_rent=$_POST['suite_price_rent'];
	$suite_price_cut=$_POST['suite_price_cut'];
	$suite_amount=$_POST['suite_amount'];

	$sql="update suite set type_id='$type_id',suite_size='$suite_size',suite_image='$suite_image' ,suite_detail='$suite_detail',suite_price_rent='$suite_price_rent',suite_price_cut='$suite_price_cut' ,suite_amount=$'suite_amount' where suite_id='$suite_id'";
	$result=mysql_query($sql,$link);
		if($result)
		{
			include "header.php";
			echo "<center>บันทึกข้อมูลเรียบร้อยแล้ว</center>";
			echo "<meta http-equiv=\"refresh\" content=\"3; url=addsuite.php\"/>";
			include "footer.php";
		}else{
			include "header.php";
			echo "<center>ไม่สามารถบันทึกข้อมูลได้&nbsp;!</center>";
			echo "<meta http-equiv=\"refresh\" content=\"3; url=frm_edit.php\"/>";
			include "footer.php";
						
		}
		?>







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-07-07 18:11:35 By : kam
 


 

No. 2



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



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


Code
type_id='".trim($_POST['type_id'])."'


ลองดูนะคะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-07-07 19:04:33 By : นู๋น้อย
 

 

No. 3

Guest


Code (PHP)
$result=mysql_query($sql,$link) or die (mysql_error());


ลองเช็คด้วยว่ามีค่าส่งมาครบหรือป่าว
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-07-08 08:25:16 By : บังเอิญผ่านมาเห็น
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยแก้ หน่อยค่ะ คือว่ามันทำการแก้ไขข้อมูลชุดไม่ได้น่ะค่ะ ช่วยด้วยน่ะค่ะ งานเรา ฮือๆๆๆๆ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 อัตราราคา คลิกที่นี่