tutorial proposition (was: Re: Succinct Code, Use of my $var and global vs local)

2001-06-06 Thread fliptop
Teresa Raymond wrote: > > This snippet of code works as it is but I was wondering if there was > a way to rewrite it more succinctly. I am also not using my $var="" after a few days of reading the code samples being posted here, i have been wondering how i can help perl beginners with advice on

Re: Succinct Code, Use of my $var and global vs local

2001-06-06 Thread Alan F. Larimer, Jr.
> I am also not using my $var="" > because my cgi class did not teach me how and I haven't found the > time to incorporate my knowledge from my recently-taken Intro to Perl > class. Some pontification on the usage my $var="" would be great. > As well as the appropriate usage of "&&" and "and"

Re: Succinct Code, Use of my $var and global vs local

2001-06-06 Thread Alan F. Larimer, Jr.
> This snippet of code works as it is but I was wondering if there was > a way to rewrite it more succinctly. I am also not using my $var="" > because my cgi class did not teach me how and I haven't found the > time to incorporate my knowledge from my recently-taken Intro to Perl > class. Som

Succinct Code, Use of my $var and global vs local

2001-06-06 Thread Teresa Raymond
To: beginnerperl.org From: Teresa Raymond <[EMAIL PROTECTED]> Subject: Succinct Code, Use of my $var and global vs local Cc: Bcc: X-Attachments: This snippet of code works as it is but I was wondering if there was a way to rewrite it more succinctly. I am also not using my $var="" because my c

RE: $ENV(HTTP_REFERER)?

2001-06-06 Thread Dianne Van Dulken
Hi Joe, This gives us the current host. We actually want to get the referrer to this page. What we are actually trying to do is to control people from viewing an include, according to their IP. A remote page calls it, and if it is off a given IP website, it gets one result, otherwise, it ge

Re: Usernames and Passwords

2001-06-06 Thread fliptop
Joe Schulman wrote: > > Hey~ > This is mainly a question directed to those with experience in this > sort of thing. > > In general, how should one go about authenticating a user and then > allowing them to view separate pages under that particular login? hi joe if you're running apache and m

RE: $ENV(HTTP_REFERER)?

2001-06-06 Thread Joe Schulman
> I too have a question about this. > below is the code: > > open(A,">>/home/thx-1138/cgi-bin/data/refs.htm"); > print A "$ENV{'HTTP_REFERRER'}\n"; > close (A); > > The file opens, prints a return/linefeed and closes... > > any ideas why this wont work??? > it looks correct to me from what i have

RE: $ENV(HTTP_REFERER)?

2001-06-06 Thread Joe Schulman
> I was hoping someone would be able to give me a clue how I could find the > referer IP. If I use the Environment HTTP_REFERER, it will work in IE, but > not in Netscape. For some people this isn't an option (CGI.pm isn't available), but it is one that works on all browsers (I have a site that

Re: $ENV(HTTP_REFERER)?

2001-06-06 Thread Luinrandir Hernson
I too have a question about this. below is the code: open(A,">>/home/thx-1138/cgi-bin/data/refs.htm"); print A "$ENV{'HTTP_REFERRER'}\n"; close (A); The file opens, prints a return/linefeed and closes... any ideas why this wont work??? it looks correct to me from what i have read. Lou ---

$ENV(HTTP_REFERER)?

2001-06-06 Thread Dianne Van Dulken
Hi, I had already posted this to beginners@perl , but someone there suggested I try here as well. I was hoping someone would be able to give me a clue how I could find the referer IP. If I use the Environment HTTP_REFERER, it will work in IE, but not in Netscape. Does a

RE: This n' that

2001-06-06 Thread Brian P. Hanley
Another reason the placeholders are a good idea is connections to the DB. You need only prepare a statement using place holders once, then use the handle for 10,000 executes (hypothetical number :)). If you use actual values in the prepare, that uses a connection to the DB each time the prepare i

Re: perl and the web

2001-06-06 Thread Chuck Ivy
On Wednesday, June 6, 2001, at 08:09 AM, Sally wrote: > I'd like some info on what perl can be used for in web applications > please, My first perl/web experiences were form handling... collecting data, writing to files. Registration forms and polls were among my first scripts. A natural exte

Fwd: Re: cgi-lib.pl

2001-06-06 Thread Curtis Poe
Sigh. Once again, forgot to sent this to the group :( Maybe I should drop "Senior" from my job title? --- Curtis Poe <[EMAIL PROTECTED]> wrote: > Date: Wed, 6 Jun 2001 15:41:51 -0700 (PDT) > From: Curtis Poe <[EMAIL PROTECTED]> > Reply-to: [EMAIL PROTECTED] > Subject: Re: cgi-lib.pl > To: Chery

Re: Usernames and Passwords , ip of the host?

2001-06-06 Thread Randal L. Schwartz
> "P" == P lerenard <[EMAIL PROTECTED]> writes: P> on my side I just check the ip address of the host which must match. No, an IP address is not a user. An AOL user changes IP addresses on each hit, even within the images on a given page. A corporate user behind a firewall shares their app

RE: This n' that

2001-06-06 Thread Curtis Poe
--- Kris Cook <[EMAIL PROTECTED]> wrote: > Ah. Both are easier. I especially like the here-doc method, which is what > I should have used. Thanks, Brett. Might I suggest that you use placeholders? It has the benefit of automatically quoting your values for you. Amongst other benefits, you w

Re: Usernames and Passwords , ip of the host?

2001-06-06 Thread P lerenard
bj, on my side I just check the ip address of the host which must match. yes somebody can change the ip address to match the ones with the access, but the network is not going to like that. load-balancing but i'm not sure. Pierre >From: "Joe Schulman" <[EMAIL PROTECTED]> >To: "Beginners-Cgi" <

Re: cgi-lib.pl

2001-06-06 Thread Hasanuddin Tamir
On Wed, 6 Jun 2001, Cheryl Kirkpatrick <[EMAIL PROTECTED]> wrote, > I took an online course that did a pretty good job of teaching the > basics of Perl. At least, I hope that it did. However, the instructor > had us use "cgi-lib.pl" instead of teaching us how to store incoming > data from a form

Re: cgi-lib.pl

2001-06-06 Thread Brett W. McCoy
On Wed, 6 Jun 2001, Cheryl Kirkpatrick wrote: > I took an online course that did a pretty good job of teaching the > basics of Perl. At least, I hope that it did. However, the instructor > had us use "cgi-lib.pl" instead of teaching us how to store incoming > data from a form to an array. I have

Re: cgi-lib.pl

2001-06-06 Thread Timothy Kimball
Cheryl Kirkpatrick wrote: : I took an online course that did a pretty good job of teaching the : basics of Perl. At least, I hope that it did. However, the instructor : had us use "cgi-lib.pl" instead of teaching us how to store incoming : data from a form to an array. I have since read that us

Re: Usernames and Passwords

2001-06-06 Thread Eduard Grinvald
Well, the unix way is ask for a string, hash a string, on return, ask again, hash again, compare... __END__ =sincerely, eduard grinvald =email: [EMAIL PROTECTED] =dev-email: [EMAIL PROTECTED] =dev-site: r-x-linux.sourceforge.net =icq: 114099136 =PGP -BEGIN PGP PUBLIC KEY BLOCK- Versio

Re: Usernames and Passwords

2001-06-06 Thread Brett W. McCoy
On Wed, 6 Jun 2001, Joe Schulman wrote: > This is mainly a question directed to those with experience in this sort of thing. > > In general, how should one go about authenticating a user and then allowing them to >view separate pages under that particular login? > > I know that cookies aren't 10

cgi-lib.pl

2001-06-06 Thread Cheryl Kirkpatrick
I took an online course that did a pretty good job of teaching the basics of Perl. At least, I hope that it did. However, the instructor had us use "cgi-lib.pl" instead of teaching us how to store incoming data from a form to an array. I have since read that using "cgi-lib.pl" is a bad idea. Shou

Usernames and Passwords

2001-06-06 Thread Joe Schulman
Hey~ This is mainly a question directed to those with experience in this sort of thing. In general, how should one go about authenticating a user and then allowing them to view separate pages under that particular login? I know that cookies aren't 100% reliable, and I also know that sending sec

RE: Perl & the web

2001-06-06 Thread Fco. Javier Valladolid Hdez.
I'm Sorry, yes it is Slahsdot.org .. Thank. - Original Message - From: Brett W. McCoy <[EMAIL PROTECTED]> To: Fco. Javier Valladolid Hdez. <[EMAIL PROTECTED]> Cc: Sally <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, June 06, 2001 2:22 PM Subject: RE: Perl &

RE: This n' that

2001-06-06 Thread Kris Cook
Ah. Both are easier. I especially like the here-doc method, which is what I should have used. Thanks, Brett. > -Original Message- > From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 06, 2001 3:15 PM > To: Kris Cook > Cc: 'SAWMaster'; [EMAIL PROTECTED] > Subject: R

RE: This n' that

2001-06-06 Thread Brett W. McCoy
On Wed, 6 Jun 2001, Kris Cook wrote: > Also, I couldn't get my ActivePerl implementation to take the $values inside > the string. I had to concatenate them with the '.' operator, as follows: > $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype, cat, call, tx) > VALUES (".$newfreq.", \'

RE: javascript and perl/cgi

2001-06-06 Thread Ksenia Sirotinskaia
If you want the content of the form submitted so that cgi can do something with it, but nothing in the browser to change (the page doesn't get reloaded do the following: onSubmit="return false;" - it processes the action when either you click a button that has or whenever you call this (window.

RE: This n' that

2001-06-06 Thread Kris Cook
Also, I couldn't get my ActivePerl implementation to take the $values inside the string. I had to concatenate them with the '.' operator, as follows: $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype, cat, call, tx) VALUES (".$newfreq.", \'".$newloc."\', \'".$newdesc."\', \'".$newfreqt

Re: javascript and perl/cgi

2001-06-06 Thread thabenksta
Im kind of confused on what your trying to do, but I think what you want to do is: You can also use javascript to submit a form by using document.formname.submit(); Hope that helps. On Wed, 6 Jun 2001, David Gilden wrote: > Hi, > > In the following: > > > Name: > Email:   > > Type your c

RE: This n' that

2001-06-06 Thread Kris Cook
All I can suggest here is to have the script display the constructed value of $sqlstatement. You may find it has an unexpected punctuation, or one of the values is null (interestingly, ODBC didn't like null values even if they were OK in the database - very odd). In my case, ODBC kept hurling un

This n' that

2001-06-06 Thread SAWMaster
Hi Kris! Looks like you have things well in hand. I'm not using Win32::ODBC for my little project, I'm using something called "DBI", I THINK that they do basically the same thing though...if I'm wrong someone please set me right. I've successfully put new data into my database from a web page

javascript and perl/cgi

2001-06-06 Thread David Gilden
Hi, In the following: Name: Email:   Type your chat message Thanks for any pointers on these two issues, Thanks Dave ** * Cora Connection Your West African Music Source * * http://www.coraconnection.com/

RE: perl help!!

2001-06-06 Thread Kris Cook
First: are you certain that the values are getting to the Perl script from the form (I'm assuuming it's a separate file). I ask because I had this problem last week; I wasn't properly extracting the parameters (using the param function in CGI.pm), and it was happily supplying me with nulls in its

RE: Perl & the web

2001-06-06 Thread Brett W. McCoy
On Thu, 7 Jun 2001, Fco. Javier Valladolid Hdez. wrote: > The best place for how Perl Work is , www.perl.com > and slashdot.com , this sites generates html directly from a Perl Program. That's slashdot.org. :-) -- Brett Brett W. McCoy Software Engineer Broadsoft, Inc. 240-364-5225 [EMAIL PROTE

Re: perl help!!

2001-06-06 Thread Eduard Grinvald
The easiest way to be prepoluate the fields with something you know couln't be the input and check for that before pushing into the table, you'd have to do that for the actual form anyway (unless you allow for NULL names, let's say :) ) __END__ =sincerely, eduard grinvald =email: [EMAIL PROTEC

formmail.pl for Windows

2001-06-06 Thread Ksenia Sirotinskaia
Hi, I have the original forrmail.pl from Matt Wright. It submits the information from the html form by e-mail. I also want it to send a confirmation e-mail to a user that filled out a form. I have the code for Unix, but not Windows. Here's the difference. Under Unix version e-mail in the .pl file

RE: Perl & the web

2001-06-06 Thread Fco. Javier Valladolid Hdez.
The best place for how Perl Work is , www.perl.com and slashdot.com , this sites generates html directly from a Perl Program. You can use perl for your Pages ok! Best regards.. - Original Message - From: Sally <[EMAIL PROTECTED]> To: perl <[EMAIL PROTECTED]> Sent: Wednesday, June 06,

perl help!!

2001-06-06 Thread David Draley
is there a way to call a perl sub routines using a FORM when a "submit" button is clicked? I am trying to push data to a mySQL database table and when my form is loaded into the browser or is "refreshed" the browser runs through my cgi script and pushes "null" values to the table. Once the form

RE: MS Access database manipulation

2001-06-06 Thread Kris Cook
Hey, I'm a three-week newbie myself, and this is the same thing I was working on! My example is an insert program, cross-referencing products (games, actually), with three attribute tables: genre (horror, sci-fi, etc.), category (board game, card game, etc.), and mechanics (card melding, dice rol

Re: Camel Book and perldoc?

2001-06-06 Thread Brett W. McCoy
On Wed, 6 Jun 2001, SAWMaster wrote: > Hi Brett! Ok so where would I find this "Camel Book and perldoc"? > I'm completely lost as far as finding info on how to do what I want to > do. I have 8 books on order from the library, but they won't be due > in for at least 2 weeks. The Camel Book is t

RE: Camel Book and perldoc?

2001-06-06 Thread Andrew Nelson
http://www.oreilly.com/catalog/pperl3/ is the Camel Book. The most holy of resources. Treasure it. Cuddle it. Give it a gift for no reason. It's your best friend - or will be. perldoc is a command installed with perl. Try "perldoc" with no arguments from the command line, and explore from there.

Camel Book and perldoc?

2001-06-06 Thread SAWMaster
Hi Brett! Ok so where would I find this "Camel Book and perldoc"? I'm completely lost as far as finding info on how to do what I want to do. I have 8 books on order from the library, but they won't be due in for at least 2 weeks. Is there a favorite web page of yours that I can take a look a

Re: MS Access database manipulation

2001-06-06 Thread Brett W. McCoy
On Wed, 6 Jun 2001, SAWMaster wrote: > Hello group, I've successfully set up a page on my server that allows > me to make custom querys to my database, and display the results on a > html page. Now I would like to make another page that would allow me > to add new records etc to the database dir

MS Access database manipulation

2001-06-06 Thread SAWMaster
Hello group, I've successfully set up a page on my server that allows me to make custom querys to my database, and display the results on a html page. Now I would like to make another page that would allow me to add new records etc to the database directly from the web, instead of only being a

Re: Email n Windows Platform

2001-06-06 Thread Gary Stainburn
PLEASE PLEASE PLEASE don't send HTML. I've not used Net::SMTP so I can't comment on whether it's better/worse/same as Mail::Sender, but for lost of reasons, don't send HTML in your email unless you REALLY need to. If the email your generating from your web form is destined for a real person,

Re: perl and the web

2001-06-06 Thread thabenksta
Sally, Perl is a very powerfull and robust language, and it can be used in almost anyway other languages like Java and Cold Fusion. You can Create and manipulate Databases, interface with XML, send Email, the possibilities are endless. Here is a nice paper on the topic: http://www.velocigen.c

open aplication in windows

2001-06-06 Thread Argenis Perez
I need open a aplication in windows I read that it's can make for Win32:OLE but not function. Thanks you -- "Es imposible calcular cuantas buenas ideas se abandonan todos los días como resultado de relaciones difíciles de manejar." - John P. Kotter -   Saludos Argenis Pérez

perl and the web

2001-06-06 Thread Sally
I'd like some info on what perl can be used for in web applications please, Regards, Sally

Re: Email n Windows Platform

2001-06-06 Thread thabenksta
You could use MIME::Lite and Net::SMTP together. MIME::Lite constructs the HTML Message and Net::SMTP sends it. -thabenksta On Tue, 5 Jun 2001, Nunya Business wrote: > Hello - > > I'm wondering how you go about taking info from a html form and have it > emailed to a recipient when the serve

Re: Email on Windows Platform

2001-06-06 Thread Gary Stainburn
Hi Brian, I could question the idea of allowing a windows machine to be made accessable on the internet but this is not a security list so I won't. I've found the best of bunch is the Mail::Sender module that is available from CPAN. It handles the SMTP directly and thus doesn't need a suppor