I am writing some code that will assisst me in making forms, my own personal form builder. So far it has been easy to code the element text (input type=text name=field1) But I am having a problem with the textarea element.
Here is a snippet of my code where i have already select textarea and set the variables (name($tname), rows($trows), cols($tcols)).
if ($elementtype =="textarea")
{
$newstuff = "<TR><TD>$tcaption  <textarea name='$tname' rows='$trows'
cols='$tcols'></TEXTAREA></TD></TR>";
$currentcontents = "$currentcontents" . "\n" . "$newstuff";
$display_title .= "<br><br>
<textarea name=fcreated cols=60 rows=15>
$currentcontents
</textarea>
}
THE PROBLEM - When I echo $display_title, it is actually interpreting the </TEXTAREA> from the $currentcontents variable and in essence closing out the textarea. I do not want this. I want to save </TEXTAREA> in the variable, but not have it actually read by the browser.
Hope this made sense.
Thanks for any help.