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 > จะดึงค่าจาก text fileld + radio ลงฐานข้อมูลพร้อมกัน



 

จะดึงค่าจาก text fileld + radio ลงฐานข้อมูลพร้อมกัน

 



Topic : 084258



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



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




คืองี๊ครับพอดีจะทามที่ให้กรอกข้อมูลและที่กรอกข้อมูลจะมี rado ให้เลือกหากเลือกจะดึงจากข้อความที่กรอกไปลงฐานข้อมูลทีpost 1ของradio



Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-09-19 13:51:42 By : dannan882 View : 1165 Reply : 2
 

 

No. 1



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

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

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

ตัวอย่าง แบบง่ายๆ(PHP)
<form name="frm" method="post" action="">
<input type="radio" name="myradio" value="myradio1">myradio<br />
<input type="text" name="mytext" value="mytext1">mytext<br />
<input type="submit">
</form>
<?
if(!empty($_POST['myradio'])){  //  ถ้าไม่ radio จะไม่ผ่านเงือนไขนี้
	// ใส่ mysql insert ตรงนี้
	echo "myradio : ".$_POST['myradio']." & mytext : ".$_POST['mytext'];
}
?>









ประวัติการแก้ไข
2012-09-19 14:57:31
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-09-19 14:56:42 By : mangkunzo
 


 

No. 2



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

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

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


Code (PHP)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>https://www.thaicreate.com/php/forum/084258.html</title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="Unidentifier">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <style>
	.disabledInput{
		background-color:darkgray;
	}
	.enabledInput{
		background-color:none;
	}
  </style>
 </head>

 <body>
	<input type="radio" name="allowText[]" id="1" /> &nbsp;<input type="text" name="textInput[]" id="text1" class="disabledInput" disabled="disabled" /><br />
	<input type="radio" name="allowText[]" id="2" /> &nbsp;<input type="text" name="textInput[]" id="text2" class="disabledInput" disabled="disabled" /><br />
	<input type="radio" name="allowText[]" id="3" /> &nbsp;<input type="text" name="textInput[]" id="text3" class="disabledInput" disabled="disabled" /><br />
	<input type="radio" name="allowText[]" id="4" /> &nbsp;<input type="text" name="textInput[]" id="text4" class="disabledInput" disabled="disabled" /><br />
	<input type="submit" name="submitForm" value="บันทึกข้อมูล" />
	<script>
		$("input[type=radio]").change(function(){
			var index = $(this,":checked").attr("id");
			alert('id:'+index+' was checked!');
			$("input[type=text]").each(function(){
				$(this).removeClass().addClass("disabledInput").attr("disabled","disabled");
			});
			$("input[type=text]#text"+index).removeClass().addClass("enabledInput").removeAttr("disabled").focus();

		});
	</script>
 </body>
</html>




ประวัติการแก้ไข
2012-09-19 16:42:38
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-09-19 16:30:46 By : sakuraei
 

   

ค้นหาข้อมูล


   
 

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