Re: Mailing Script

2004-07-08 Thread Werner Otto
Randal L. Schwartz wrote: "Werner" == Werner Otto <[EMAIL PROTECTED]> writes: Werner> $surname = param("surname"); Werner> $name= param("forename"); Werner> $email = param("email"); I'm not sure what the rest of the sc

Re: Mailing Script

2004-07-08 Thread Werner Otto
Wiggins d Anconia wrote: Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; The permissions on running.pdf was not correct. It helps if you know ho

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; The permissions on running.pdf was not correct. It helps if you know how to debug! Talking about debugging... You should get the habit of

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I've tried to change to localhost , no go... Okay. Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; Change this line: $msg->send; to $msg->send or die "Error sending msg: $!&quo

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: If you don't get any error messages, another theory is that it has something to do with the configuration of the mail server. You could for instance try to change my $mail_host = 'smtp.dcs.kcl.ac.uk'; to

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I would try changing those to full paths. It's not advisable to rely on an assumption about the working directory. Optionally you can set the working directory with the chdir() function. I have changed the path to the full path concerning the

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I have this script mentioned below. When I run it from command line: perl test.cgi all works as it should. When I run it from my browser it only writes the file displays the confirmation, but does NOT email my files. my $my_file_gif = 'logo.gif&#

Mailing Script

2004-07-08 Thread Werner Otto
Hi All, I have this script mentioned below. When I run it from command line: perl test.cgi all works as it should. When I run it from my browser it only writes the file displays the confirmation, but does NOT email my files. From command line everything works. #!/usr/bin/perl use CGI qw(:stan

Sending attachments in perl

2004-07-08 Thread Werner Otto
Hi All, I am having a problem sending mail with Net::SMTP. Does this module support attachements at all? I know that MIME::Lite supports attachments, but I dont have it installed. And I also don't have privilages to install it. I need another alternative. Any ideas? Regards Otto* * -- To unsubs

popup_menu

2004-06-25 Thread Werner Otto
Hi have the following code: print popup_menu(-name=>'hosts',-values=>['1','2','3'],-default=>['2']); the default value doen not seem to appear, any reason why? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

popup_menu

2004-06-24 Thread Werner Otto
Hi All, Any idea how to disable a popup_menu? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

popup_menu item select

2004-06-18 Thread Werner Otto
Hi All, When I select an item in a popup_menu it needs to print "Hello". In other word how do I get the name param from the popup_menu by selecting a value only and not by posting in the form of a submit button. Any help would be appreciated -- Kind Regards, Werner Otto -- To unsu

Re: Can't coerce array into hash at - error

2004-06-17 Thread Werner
This is not the full source code, here is the full source or what is needed from the top #!/usr/bin/perl use DBI; use Switch; use CGI qw(:standard); cgi_header_line(); kings_header(); if ($ENV{'SCRIPT_NAME'} =~ m,\host_update.cgi$,) { mit_header(); standard_body(); } $db="wotdb"; $host="arg

Can't coerce array into hash at - error

2004-06-17 Thread Werner Otto
t ""; print ""; print ""; print popup_menu('name'=>'hostname', 'values'=>[EMAIL PROTECTED],'default'=>$hostname,'labels'=>\%hostname); print ""; print ""; -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Checkbox_group

2004-06-16 Thread Werner Otto
-name=>'hdel',-values=>[$hostname,$hostip]),; But I don't want $hostip's value to appear on the form, it should be available when I request the param though. Any ideas? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Posting hyperlink value

2004-06-15 Thread Werner Otto
Hi All, mit.cgi file: I have a hyperlink defined as: $hostname in a form. The $hostname values are retrieved from the mysql database in a fetch() loop. My code in host.cgi: #!/usr/bin/perl use CGI qw(:standard); print "Content-type: text/html\n\n"; $posted_hostname = param("$hostname"); Why am I

use CGI qw(:standard);

2004-06-14 Thread Werner Otto
When using this module and Im printing out a checkbox group: print checkbox_group(-name=>'hdel',-values=>[$hostname]),; is there a way to sneak through a hidden value $hostip in there somehow aswell? -- Kind Regards, Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Link

2004-06-14 Thread Werner Otto
On Mon, 14 Jun 2004 13:46:04 +0200, Ash Singh <[EMAIL PROTECTED]> wrote: -Original Message- From: Werner Otto [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 1:25 PM To: [EMAIL PROTECTED] Subject: Link Hi all, I have form that is made up of records retrieved from a databas

Link

2004-06-14 Thread Werner Otto
Hi all, I have form that is made up of records retrieved from a database. The first column presents the information as a hyperlink. I need to be able to keep a record on which one of the multiple hyperlinks where clicked. Based upon the selected link I need to pass the value to the next CGI and

use CGI qw(:standard);

2004-06-11 Thread Werner Otto
Hi, I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button and need to tell the button which script to call (ie. action=test.cgi). Where can I find documentation on all the attributes of the components, or an example for my two queries would be

Current Value

2004-06-10 Thread Werner Otto
Hi, When Im looping through as cgi that loops through records in a table, I do a print statement of a variable. Example if($condition eq "G") { print $field1; } why does it print all the occurances of the fields in the table, as only one of them fits the criteria of equaling "G". Is there some

Re: Requireing a specific sub

2004-05-25 Thread Werner Otto
e in the cgi script #!/usr/bin/perl use DBI; use strict; use lib "."; use SimpleModule; connect_db(); The error is: Undefined subroutine &main::connect_db called at mit.cgi line 8. any ideas? On Tue, 25 May 2004 13:36:34 +0200, Jan Eden <[EMAIL PROTECTED]> wrote: Werner Otto w

Requireing a specific sub

2004-05-25 Thread Werner Otto
Hi there, Is there any way that I can call a specific sub from a cgi script. i.e. script1.cgi sub print1 { print "hello1"; } sub print2 { print "hello2"; } script2.cgi my messy code: require("/home/user/public_html/script1.cgi.script2()"); obviously this does not compile. But the results needed

Calling of subs

2004-05-25 Thread Werner Otto
hi there, how do i call a subroutine from one cgi to another? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Template

2004-05-24 Thread Werner Otto
Hi there, How to I include or call another cgi script from a current one. I want to create say a header script that I just want to include it when I want to. What does the syntax look like? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

String Variable

2004-05-20 Thread Werner Otto
hi there, I've got the following example: system ("ping -a $hostname | cut -c20-30"); how do I get the following result which is (is alive) into a string variable as I keep on getting 0 Please help. Regards Werner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Network Monitoring

2004-05-20 Thread Werner Otto
Hi there, This is a slighly of the topic post, but has a relation to perl. My company is looking for a network monitoring system with functionality that allows us to see that all connections to our servers are up and running and to keep track of the kb/s and response time. Yes, this sounds like

Network Traffic Monitoring

2004-05-17 Thread Werner Otto
Hi there, Does anyone know of a good, and good looking network monitoring open source web based application? Something that includes kb/s and response time. And of course can be viewed in a web-page format(graphs). Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Displaying another page

2004-05-17 Thread Werner Otto
Hi there, I have the following situation where I need to call a html page depending on. if($name eq "") { call/display my html page. } Can anyone help me out with the syntax for that one line please. -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Browsers?

2004-05-14 Thread Werner Otto
Is there any way in which I can make my site appear the same in all available browsers? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Post Method

2004-05-14 Thread Werner
p;/,$temp); foreach $item(@pairs) { ($key,$content)=split (/=/,$item,2); $content=~tr/+/ /; $content=~ s/%(..)/pack("c",hex($1))/ge; $fields{$key}=$content; } what changes to I have to make to implement my variables using the "POST" method. Regar

Data encryption

2004-05-14 Thread Werner
ch+ is there any way that I make sure these details are not seen or to be encrypted in some way? Kind Regards Werner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Print statement

2004-05-13 Thread Werner Otto
eader - Override current body header"; } else { bod_head = "Body header in orig. place"; } -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Switch

2004-05-13 Thread Werner Otto
Is there some kind of a swtich statement in perl? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>