LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2002, 01:56 PM   #1
csjosh
LQ Newbie
 
Registered: Jun 2002
Posts: 16

Rep: Reputation: 0
Question How does Apache do HTML textareas?


Hello,

I am trying to keep the text input into an HTML textarea the same as it was input, but when I pass it to Apache and even run it through the code to seperate the hex values and spaces etc. the newline characters get lost somwhere. LQ handles it great. Any suggestions?

Thanks, Josh
 
Old 07-30-2002, 04:11 PM   #2
muthu
LQ Newbie
 
Registered: Jul 2002
Posts: 6

Rep: Reputation: 0
hi,
i don't know what scripting lang. u happen to use.
when i used php with apache the utility ( command ) "nl2br" fixed the problem for me.

i input the data from the textarea to a database and then to display ....i read the database and pass it through "nl2br" and then print it ...

try it out .... in PHP.

GOOD LUCK !!!
bye.
 
Old 07-30-2002, 04:24 PM   #3
LiveMatter
LQ Newbie
 
Registered: Jul 2002
Posts: 5

Rep: Reputation: 0
I am using perl 5 and the POST method. I can't figure it out.

Last edited by LiveMatter; 07-30-2002 at 04:31 PM.
 
Old 07-30-2002, 04:34 PM   #4
csjosh
LQ Newbie
 
Registered: Jun 2002
Posts: 16

Original Poster
Rep: Reputation: 0
I run Apache with perl v5.6.0 and use POST. It works fine with textfields but not textareas
 
Old 07-31-2002, 01:34 AM   #5
csjosh
LQ Newbie
 
Registered: Jun 2002
Posts: 16

Original Poster
Rep: Reputation: 0
Figured It Out

I figured it out. Here's the code if anyone is interested:

#!/usr/bin/perl

use strict;
use CGI;
use CGI::Carp 'fatalsToBrowser';

my $cgi = new CGI;

print $cgi->header();

my $data = $cgi->param('the_name_of_your_textarea_goes_here');

my $filename='test.dat';
open (LOG, ">>$filename");
print LOG "$data\n";
close (LOG);

print "Data now saved\n";

exit;
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where do i store my html files for my apache? philfighter Linux - Networking 8 04-22-2015 09:26 AM
Apache HTML directory dwpondscum Linux - Networking 5 08-19-2005 09:49 PM
Root access to html in apache RJDavison Linux - Newbie 1 05-12-2004 07:45 PM
JavaScript TextAreas jacksmash Programming 9 12-27-2003 02:02 PM
Apache: I want .pl as default page not html jkahlich Linux - Networking 2 10-29-2001 11:15 PM


All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration