Re: ssi and redirects

2002-04-28 Thread Joshua Hayden
an you get cookie values when using SSI? I know you can't send them, but am not sure if you can retrieve them. Best Regards, JOSHUA D. HAYDEN - Original Message - From: "Mat Harrison" <[EMAIL PROTECTED]> To: "Joshua Hayden" <[EMAIL PROTECTED]>; "B

Re: ssi and redirects

2002-04-28 Thread Joshua Hayden
It doesn't work because the HTML Content-type has already been sent to the browser when it started load the .shtml page. You could use javascript. Some people are afraid do use javascript because old browsers don't understand it. If someone

Re: pattern matching for serial number

2002-04-26 Thread Joshua Hayden
Let's remember to anchor the location of the string... $serial = "455WD165"; if ($serial !~ m/^[0-9]{3}[A-Z]{2}[0-9]{3}$/ ) { print "Bad!"; } else { print "Good!"; } The caret and dollar sign are very important. Without it, someone could type HK45J455WD165AGKB and it would still pass the re

Re: Search engines and server side includes

2002-04-21 Thread Joshua Hayden
> I know that the search engines don't index the CGI generated web pages. Actually...I have a website that has articles which a perl script generates. The URL to the articles look like http://site.com/article.pl?article=thearticle. I have an SHTML page which links to each one of these articles. G

Re: Changing an apparent address

2002-04-08 Thread Joshua Hayden
This seems to work: print "Location: http:/www.mycompany.com/response_to_form.html\n\n"; Best Regards, JOSHUA D. HAYDEN - Original Message - From: "Barry Kingsbury" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 08, 2002 10:48 AM Subject: Changing an apparent address

Re: Redirecting to a page and downloading

2002-04-07 Thread Joshua Hayden
Javascript seems to work pretty well for this. If you put this in a page, the visitor will be prompted to download the file as soon as the page is fully loaded. Best Regards, JOSHUA D. HAYDEN - Original Message - From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sen

Re: 1 or 2 decimals

2002-04-01 Thread Joshua Hayden
Why not use the sprintf or printf function? # Assigns 3.14 to the $decimal variable my $decimal = 3.1415; $decimal = sprintf('%.2f', $decimal); # Prints 3.14 my $decimal = 3.1415; printf('%.2f', $decimal); # Prints 3.1 my $decimal = 3.1415; printf('%.1f', $decimal); You get the idea... Best R

Re: mysterious leading spaces (same foreach problem w/ more details)

2002-03-12 Thread Joshua Hayden
- Original Message - From: "James Woods" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 10:56 PM Subject: Re: mysterious leading spaces (same foreach problem w/ more details) > I used the following code to write out all my hidden fields.

Re: Expanding param("someinput") in here document

2002-03-07 Thread Joshua Hayden
- Original Message - From: "Rob Roudebush" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 07, 2002 10:39 PM Subject: Expanding param("someinput") in here document > > I'm trying to avoid assigning each param("somekey") to a variable in order to expand it in my here doc

Re: Very serious security hole in your script

2002-02-26 Thread Joshua Hayden
> Is there a good tutorial on untainting data received via a cgi script? If you look at the message right before yours, you'll see a link. http://www.easystreet.com/~ovid/cgi_course/lesson_three/lesson_three.html Best Regards, JOSHUA D. HAYDEN Owner/Operator of www.PinnacleSiteDesign.com -

Re: Limiting form field submission length with perl

2002-02-21 Thread Joshua Hayden
use CGI ':standard'; if (length(param('field')) > 25) { subroutine("Please limit your response to 25 characters."); } elsif ... Best Regards, JOSHUA D. HAYDEN Owner/Operator of www.PinnacleSiteDesign.com - Original Message - From: "Hughes, Andrew" <[EMAIL PROTECTED]> To: <[EMAIL PROT

Re: selecting a text file for HTML output

2002-02-21 Thread Joshua Hayden
Not exactly sure what you're trying to do...Try something like this. #!/usr/bin/perl print "Content-type: text/html", "\n\n"; print "\n\n"; print "test page\n"; print "\n"; print "\n"; open TEXT, "../cards/dougs.txt"; while () { print "$_"; } close TE