LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 12: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, 03: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, 03: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 03:31 PM.
 
Old 07-30-2002, 03: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, 12: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



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 08:26 AM
Apache HTML directory dwpondscum Linux - Networking 5 08-19-2005 08:49 PM
Root access to html in apache RJDavison Linux - Newbie 1 05-12-2004 06:45 PM
JavaScript TextAreas jacksmash Programming 9 12-27-2003 01:02 PM
Apache: I want .pl as default page not html jkahlich Linux - Networking 2 10-29-2001 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:48 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
Open Source Consulting | Domain Registration