How to add Textbox dynamically in php

I will show you how to add textbox, select, or any checkbox dynamically in PHP. I will show you how to add dynamic textbox while clicking on link.

<head>
<script language="javascript" type="text/javascript">
function add_textbox()
{
      document.getElementById("data").value="<input type='text' name='name'>";
}
</script>
</head>
<body>
<a onClick="add_textbox()">Add Textbox</a>
</body>

We can easily add all types of inputs dynamically.

Thank you

Premal Katigar
Advertisements