Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate dynamically multiple subdirectory into folder using multiple input type textboxes in For Loop?
    primarykey
    data
    text
    <p>i need help to solve how to create dynamically multiple folders using <code>input type textbox</code>? i can create only single dynamically subdirectory into the folder but i want to multiple subfolder when multiple input type textbox are display?</p> <p>problem is that i can create only one subdirectory into the folder at time using input type textboxes </p> <p>i have already create multiple textbox using javascript?</p> <p><strong>Php Code</strong></p> <pre><code>//creating a folder $folder = implode($_POST['folder']); for($i=0; $i&lt;$folder; $i++) { $dirPath = 'uploads/'.$folder.[$i]; $result = mkdir($dirPath); } </code></pre> <p><strong>Javascript</strong></p> <pre><code>&lt;script type="text/javascript"&gt; var i = 0; function changeIt(){ i++; var table=document.getElementById("itemdetail"); var row=table.insertRow(); var cell1=row.insertCell(); cell1.innerHTML="&lt;input type='text' name='folder[]' id=folder_"+i+"'/&gt;"; } &lt;/script&gt; </code></pre> <p><strong>Form</strong></p> <pre><code>&lt;form method="post" enctype="multipart/form-data"&gt; &lt;input type="text" name="folder[]" id="folder_0" /&gt;&lt;br /&gt; //dynamically creating textbox into table row &lt;table id="itemdetail"&gt;&lt;/table&gt; &lt;input type="button" n="addnewitem" id="addnewitem" value="Add New Question" onClick="changeIt()"/&gt; &lt;/form&gt; </code></pre> <p><strong>For Example</strong></p> <pre><code>input type value is test1 ... uploads/subdirectory = test1 input type value is test2 ... uploads/subdirectory = test2 input type value is test3 ... uploads/subdirectory = test3 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload