SSI and use CGI qw(param);

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
celovec
-


Joined: 26 May 2006
Posts: 3

PostPosted: Fri May 26, 2006 11:05 am    Post subject: SSI and use CGI qw(param); Reply with quote

Help please to understand.
How to adjust use CGI qw (param);?
He does not want to work
Back to top View user's profile Send private message
celovec
-


Joined: 26 May 2006
Posts: 3

PostPosted: Sat May 27, 2006 11:59 am    Post subject: Re: SSI and use CGI qw(param); Reply with quote

The script is loaded in html page through SSI
send.html:
Code:
<!--#include virtual="/cgi-bin/sends.pl"-->
<form name="forma" ACTION="send.html" METHOD="POST">
<input type="text" name="prm" value="">
<input type="text" name="rms" value="">
<input class="button" type="submit" name="go" value="GO">
</form>

sends.pl:
Code:
#!/usr/bin/perl
use CGI qw(param);
print "Content-type: text/html\n\n";

my $prm = param("prm");
my $rms = param("rms");

if (param()) {

if ($prm and $rms) { print "<b><p>$prm ,  $rms </p></b>\n"; }

}
else {
#
}
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat May 27, 2006 2:29 pm    Post subject: Re: SSI and use CGI qw(param); Reply with quote

celovec,

The way you link the HTML page with the script is wrong. Use this instead:

Code:
<form name="forma" ACTION="/cgi-bin/sends.pl" METHOD="POST">
<input type="text" name="prm" value="">
<input type="text" name="rms" value="">
<input class="button" type="submit" name="go" value="GO">
</form>

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
celovec
-


Joined: 26 May 2006
Posts: 3

PostPosted: Sat May 27, 2006 3:32 pm    Post subject: Reply with quote

How should look perl script?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun May 28, 2006 12:45 pm    Post subject: Reply with quote

celovec wrote:
How should look perl script?

The Perl script you have already listed looks fine and should work with no problems.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group