not an error but its not working correctly as i need.
This is the code for adding blank field (textarea box) to static html page.
I am trying to get the field info on the next page that is php with the basic
echo $HTTP_POST_VARS['it'];
problem is if user add more then 1 field they are all named 'it', 'it' , 'it' on and on.. this want work good for database use or anything.
solution?
looking for a way to make this field names 'it1', 'it2' 'it3' etc.. someway to get all the fields that user added.
<script language=JavaScript>
function addtext(fieldName){
outHtml = fieldName + ":<input type=text name='" + fieldName + "'><BR>";
document.getElementById("textarea").innerHTML = document.getElementById("textarea").innerHTML + outHtml;
}
</script>
</head>
<body>
<form method=post action=name.php name=form1>
<span id=textarea>
<br>
</span>
<input type=button value="Add field" onclick="addtext('iteam');"><BR>
<input type=Submit value=submit name=submitbutton>
</form>
any help would be grate.