var a=0;
function _add_more() {
var txt = "<br><input type=\"file\" name=\"item_file[]\"><br><input type=\"text\" name=\"text"+a+"\">";
document.getElementById("dvFile").innerHTML += txt;
alert(a);
a=a+1;
}
I am using multiple file upload and with multiple titles. I am not able to save text in database for title. Can you please tell the correct syntax $_POST["text"]
, where should i put a that i am increementing.
$insert=mysql_query("insert into image_upload set title='".$_POST["text"]."', image='".$filen."'") or die(mysql_error());