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 > ใครเคยใช้ multi upload ตัวนี้บ้างคะ อยากทราบว่า จะดึงค่าเข้า Database อย่างไรคะ



 

ใครเคยใช้ multi upload ตัวนี้บ้างคะ อยากทราบว่า จะดึงค่าเข้า Database อย่างไรคะ

 



Topic : 066225



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



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




ใครเคยใช้ multi upload ตัวนี้บ้างคะ อยากทราบว่า จะดึงค่าเข้า Database อย่างไรคะ


multifile_compressed.js

Code (JavaScript)

// Multiple file selector by Stickman -- http://www.the-stickman.com 
// with thanks to: [for Safari fixes] Luis Torrefranca -- http://www.law.pitt.edu and Shawn Parker & John Pennypacker -- http://www.fuzzycoconut.com [for duplicate name bug] 'neal'
function MultiSelector( list_target, max ){
	this.list_target = list_target;
	this.count = 0;
	this.id = 0;if( max ){this.max = max;} else {this.max = -1;};
	this.addElement = function( element ){if( element.tagName == 'INPUT' && element.type == 'file' ){element.name = 'file_' + this.id++;element.multi_selector = this;
	element.onchange = function(){var new_element = document.createElement( 'input' );
	new_element.type = 'file';
	this.parentNode.insertBefore( new_element, this );
	this.multi_selector.addElement( new_element );
	this.multi_selector.addListRow( this );
	this.style.position = 'absolute';
	this.style.left = '-1000px';};
	if( this.max != -1 && this.count >= this.max ){element.disabled = true;};
	this.count++;this.current_element = element;} else {alert( 'Error: not a file input element' );};};
	this.addListRow = function( element ){var new_row = document.createElement( 'div' );
	
	var new_row_button = document.createElement( 'input' );
	new_row_button.type = 'image';
	new_row_button.src = '../icon/del1.png';
	new_row_button.title = 'Delete';
	
	new_row.element = element;
	new_row_button.onclick= function(){this.parentNode.element.parentNode.removeChild( this.parentNode.element );
	this.parentNode.parentNode.removeChild( this.parentNode );
	this.parentNode.element.multi_selector.count--;
	this.parentNode.element.multi_selector.current_element.disabled = false;return false;};
	new_row.innerHTML = element.value;new_row.appendChild( new_row_button );
	this.list_target.appendChild( new_row );};};




index.php

Code (PHP)
<html>

<head>
	<!-- Include the javascript -->
	<script src="multifile_compressed.js"></script>
</head>

<body>

<!-- This is the form -->
<form enctype="multipart/form-data" action="your_script_here.script" method = "post">
	<!-- The file element -- NOTE: it has an ID -->
	<input id="my_file_element" type="file" name="file_1" >
	<input type="submit">
</form>
Files:
<!-- This is where the output will appear -->
<div id="files_list"></div>
<script>
	<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
	var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 3 );
	<!-- Pass in the file element -->
	multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>
</body>
</html>




Tag : PHP, MySQL, Ms SQL Server 2005, JavaScript







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2011-09-08 21:57:31 By : naked13 View : 1487 Reply : 3
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

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

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

น่าจะเหมือนตัวนี้ครับ





Go to : PHP MySQL Multiple Upload File to MySQL Database - CreateElement Input File Upload
Go to : PHP MySQL Upload File to MySQL Database - Multiple Dynamic CreateElement Input File Upload






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-11-17 13:22:15 By : webmaster
 


 

No. 2

Guest


ถ้า จาก โพสของท่าน เจ้าของกระทู้จะเขียน จำกัดขนาดไฟล์ ก่อน upload อย่างไงหลอครับช่วยชี้แนะด้วยไม่ค่อยเ็นคนไทยเขียนเลยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-11-28 10:52:31 By : jakkapan
 

 

No. 3



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



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

กำหนดเงื่อนไขจาก ['filename']['size'] ไงครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-11-28 13:57:19 By : ALTELMA
 

   

ค้นหาข้อมูล


   
 

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