<?php $id=$_REQUEST['CID']+1; ?> <div style="float:left;width:100%"> <div style="float:left;width:100%"> <input type="text" style="width:140px;" name="education[]" /><a href='javascript: if(confirm("Are You Sure?")) { removeElement("myDiv1","my<?php echo $id; ?>myDiv1"); }'><img src="images/delete.png" style="border:none;" width="10" height="10" /></a></div> </div>