Maybe the 

value=$dt 

Needs to be

value="$dt"  
 
-----Original Message-----
From: Troy May [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 14, 2002 8:55 PM
To: Beginners CGI List
Subject: Re-displaying data back into forms


Hello,

This may be hard to explain, but I have a form consisting of 3 one-line
text boxes, and 1 multi-line textarea box.  When I load the page each
and every time, I want the PREVIOUS data to be displayed in the text
boxes.  Similiar to web forums when you click to EDIT your own post and
it shows all the data in the text boxes to edit.  So I have the CGI
writing to a temp file in this
format:

--------------------------------------------------
Test Test Test |Test Test Test |Test Test Test |This is the text in the
multi-line message box.
--------------------------------------------------

Then I have the following code to re-assign it to variables:

---------------------------------------------------
unless ($action) {
open (TEMP,"$filename2") or die "Can't Open $filename2: $!\n"; $line =
<TEMP>; close(TEMP); ($dt, $time, $topic, $eurom) = split(/\|/, $line);
$eurom =~ s/<p>/\r/g;  # I'm not sure if this even works &print_form;

}
----------------------------------------------------

Then when I display the form, I have the following to insert those
values: (only one tag given just to show you)

----------------------------------------------------
<TD width=100>Date:<INPUT size=47 name="dt" value=$dt></TD></TR>
----------------------------------------------------

Now, the problem is that the first 3 one line text boxes only re-display
the first word of the string, and the multi-line box only displays the
first paragraph of the data.  (until the ENTER button is pressed)

Any ideas on how to make it display ALL the data that was saved to the
file. If any of you guys and gals are familiar with web forums - I'm
trying to do what they do when you click to EDIT your post.  It shows
ALL the data in the text boxes.

Thanks.


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


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

Reply via email to