javascript - how can i add value to form in php? -


i writing program print folder names directory , , print in form , add textbox , button . want give value in text , update it. can print folders iwant suggestion button click .

enter code here  $rootpath = 'd:/wwebserver/storage/'; if ($handle = opendir($rootpath)) { while (false !== ($dev = readdir($handle))) { if ($dev != "." && $dev != "..") { $folder[] = $dev; echo "<form action='confi.php' method='post'><table class='gradienttable' cellspacing='10'> <tr><td>folder name</td><td>$dev</td> td>folder name2</td><td><input type='text'></td> <td><button type='button' onclick=' ' >apply</button> </tr></table></form>"; } } }   want show value provide in textbox after button click .  

use value attribute of input

"<form .... <input type='text' value='$dev' />....</form> 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -