This one is a little hard to explain.  I have a .cgi program that offers a 
textarea form box.  The contents are used to generate a text file that is 
then used as an SSI in an html program.  This text must be changed from 
time to time.

In order to make it easier to modify the text, I grab the previous text and 
put it into the form for editing.  Problem is: if one wants to blank out 
the text entirely by deleting everything and submitting it, to have nothing 
placed in the text tile, the entire previous message reappears.  The blank 
form doesn't take.

Work around has been to place at least one blank space in the form.  Then 
everything works fine; I get a blank text field file.  Rather than having 
to explain to all other users to do this, it would be much better if one 
could just delete the text (blank out the form) and submit, rather than 
having to remember to put a space in.  I don't know how to make this happen.

Here is the snippet:

my $textold;
    open(EVENT, "<event2.txt") or die("Cannot open: $!");
    $textold=<EVENT>;
    close(EVENT) or die("Cannot close event2.txt: $!");

print <<FORMSTART;
<form method = "post" action = "eventput2.cgi">
<p><strong>Event Title: </strong>
<input name = "title" type = "text" size = "40"></p>
<strong>Enter Event Description &amp; Details Here:</strong><br>
<textarea name = "comment" rows = "20" cols = "72">$textold</textarea></p>

....

$textold is forwarded even when the blank is submitted empty.  How to fix?

Thanks, Walt Sanders.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to