I had same problem with a preview post form I created.. Problem is that 'value=$dt >' assigns translates to 'value=test test test >' Thus only displaying the first test .
To fix it u have to make sure u have ' value="$dt" >' this will solve your problem. Note: if the string $dt has any " characters in it this will also break the value = statement. Advise using regex to strip or replace " in your incoming data. Kris G Findlay "you are only young once, http://www.knight-shift.com but you can be immature forever" -----Original Message----- From: Troy May [mailto:[EMAIL PROTECTED]] Sent: 15 March 2002 04:55 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]