jerzyk
asked on
Document contains no data
Please help me,
I wrote a cgi:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
#full path
$file="/home/httpd/html/da ne.html";
#require cgi-lib.pl
require "cgi-lib.pl";
&ReadParse;
#otwiera plik i dostawia do niego nowe dane
open(DB,">>$file");
#drukuje informacje
print DB "\n<B>$in{'name'}<BR>";
print DB "\n$in{'location'}</B><BR> ";
print DB "\n$in{'comments'}<BR><HR> \n";
close DB;
And html file:
<html>
<head>
<title>Test</title>
</head>
<form method=post action="../cgi-bin/dane.pl ">
Nazwa:<input name="name"><br>
Adres:<input name="location"><br>
<BR>Komentarz:<br>
<textarea name="comments">
</textarea>
<input type="submit">
</form>
<b>Show me entries:</b>
<BR>
When I submit this form I receiving a
"Documen contains no data"
message. But when I reload form page I see new entries.
dane.pl has 755
dane.html has 666
please help me,
JerzyO.
I wrote a cgi:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
#full path
$file="/home/httpd/html/da
#require cgi-lib.pl
require "cgi-lib.pl";
&ReadParse;
#otwiera plik i dostawia do niego nowe dane
open(DB,">>$file");
#drukuje informacje
print DB "\n<B>$in{'name'}<BR>";
print DB "\n$in{'location'}</B><BR>
print DB "\n$in{'comments'}<BR><HR>
close DB;
And html file:
<html>
<head>
<title>Test</title>
</head>
<form method=post action="../cgi-bin/dane.pl
Nazwa:<input name="name"><br>
Adres:<input name="location"><br>
<BR>Komentarz:<br>
<textarea name="comments">
</textarea>
<input type="submit">
</form>
<b>Show me entries:</b>
<BR>
When I submit this form I receiving a
"Documen contains no data"
message. But when I reload form page I see new entries.
dane.pl has 755
dane.html has 666
please help me,
JerzyO.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
print "Content-type: text/html\n\n";
print qq(<html><head><title>docu