I have a form that people are going to be filling out online. I am using
JavaScript on the front-end to validate the form. However, for security
sake and for my own knowledge, I would like to know how to limit the length
of form submissions on my server validation sequence. I don't want to cut
I have a pipe delimited text file in which I am collecting form submissions.
I have the permissions currently set to 666. The problem is that if someone
can figure out the path the .txt file, they can view it from their browser.
I do not want this to happen. After a period of time, I am planning
Message-
From: Lisa Nyman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 8:58 AM
To: Hughes, Andrew
Subject: Re: permissions question
Hi,
Any sort of data file should be maintained outside of web server
space with permissions that allow the web demon to access it in the
manner it
I have a tab delimited flat text-file database (hotels.txt) with hotel info
from all 50 states in the following fields:
$available (1=available; 0=unavailable)
$location_num (numbers 1-50)
$location_txt
$city
$hotel_name
$celo_inc_pub_rates
$ia_inc_pub_rates
$celo_room_only_rates
$ttg_room_only_r
I need help. I inherited this script that adds people to a text file for
our mailing list. It works in Explorer. However, it does not work in
Netscape. Valid email addresses are blocked and the subroutine dienice is
called in Netscape. It is pretty short and simple. I do not have time to
rew
;Please enter a valid email address");
}
Thanks for your patience with my beginner faux pas. I will be a better
member of this list from here on out.
Andrew
-Original Message-
From: John Brooking [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 1:24 PM
To: Hughes, Andrew; [EMAI
I am trying to write a script that will send a user to a certain webpage
based on the refering url. I am embedding it in a .shtml page as an
include. There are 3 urls that I will redirect to based on the refering
url. The way it is now, if I type in the url
"http://www.mysite.com/atlhmbnk/index
I am still trying to create this redirect script that is called when the
referring page refreshes after 0 seconds (with a meta tag) to the
redirect.pl. I am having a couple of problems. The first is that when it
refreshes the scripted does not recognize the page as the referring page.
Each time
When using cgi.pm object oriented method, how do I assign a static value to
a variable and then output it? The test script that I listed below prints
all of the html tags with "Hello!Did it work?" (without the quotes) in the
paragraph tags. Also, in my error log there is the following error:
in
I have been given the task of creating a multi-page form that will consist
of 4 parts. The final page will the list out everything that the users have
entered and ask if they would like to go back to any of the 4 sections to
update the information. Once the users are satisfied with the final
pro
I am running windows 2000 professional on my laptop and I am using
Indigoperl (http://www.indigostar.com/indigoperl.htm). It was extremely
easy to download, install and use.
Andrew
-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 1:19 PM
To: [
I am having a problem making printf work correctly. The following line of
code:
printf("\$%4.2\n", $subtotal);
prints outputs:
$%4.2
to my browser.
Subtotal is defined and if it equals 21 and I type:
print qq($subtotal);
it outputs 21.
Does anyone have any suggestions?
Thanks,
Andrew
--
Thanks! It works now.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 2:57 PM
To: 'Hughes, Andrew'; '[EMAIL PROTECTED]'
Subject: RE: printf not printing correctly
> -Original Message-
> From: Hug
Never mind. I figured it out using substr().
Thanks,
Andrew
-Original Message-
From: Hughes, Andrew
Sent: Wednesday, October 16, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: replacing numbers around a decimal
I am creating a little calculator that is going to need to take a user
I am creating a little calculator that is going to need to take a user
entered number that will always have 2 decimal places (using sprintf). It
could be 89562321.29 or it could be 101.00) and take the last 4 digits (with
the period included, so five places) and do two things:
1)Store the number
Thanks Felix. I actually used
$start_discounted_gift_cert = ($total_start) *
($start_discounted_gift_cert_of_total);
$start_discounted_gift_cert = sprintf("%8.2f",$start_discounted_gift_cert);
$giftcert_remainder_first = substr($start_discounted_gift_cert, -5);
$giftcert_remainder_first = sprint
I have a mysql table with about 3000 rows of data on which that I need to
perform a daily backup. Because I am on a shared hosting account I do not
have administrative rights to the database. To back it up currently I have
a script that prints each line of data to the browser delimited with pipes
|$row->{purchase}\n";
}
$sth->finish();
close(OUTFILE);
Thanks,
Andrew
-Original Message-
From: LRMK [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 2:16 PM
To: Hughes, Andrew; [EMAIL PROTECTED]
Subject: Re: how to print mysql table to text file backup wi
, Andrew
Cc: [EMAIL PROTECTED]
Sent: 1/6/2003 6:21 PM
Subject: RE: how to print mysql table to text file backup with perl
On Mon, 6 Jan 2003 at 15:11, Hughes, Andrew opined:
HA:my $filename = "out.txt";
HA:open(OUTFILE,">$filename");
HA: $stmt = qq { select * from 2002broc
Hello all,
I am trying to use the Apache::Session module to create and store session
information. This is my first attempt at using a session to store user
info, so please stick with me. The book that I have been using for
direction is Paul Dubois' "MySQL and Perl for the Web." In it (pg. 329),
I have to say that as a relative beginner, I have really noticed that using
cgi.pm to generate forms and entire web pages is a more than a little time
consuming. In the interest of time, I have been using "print <
When I view the source of results I see the tag "" where I expect to see "World".
Any thoughts?
Andrew
-Original Message-
From: fliptop [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 7:07 AM
To: Hughes, Andrew
Cc: '[EMAIL PROTECTED]'
Subject:
information in the script. Could it be a permission issues on the .tmpl
file or the .pl file?
-Original Message-
From: fliptop [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 12:59 PM
To: Hughes, Andrew
Cc: '[EMAIL PROTECTED]'
Subject: RE: cgi.pm generate html vs. print <
Actually, I am sort of embarrassed (and proud) to say that I figured out
that one late last night. It works now.
Thanks for all of your help ... and patience as usual.
Andrew
-Original Message-
From: fliptop [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 8:15 AM
To: Hughes
: Derrick Spell [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 1:53 PM
To: Hughes, Andrew
Cc: [EMAIL PROTECTED]
Subject: Re: cgi.pm generate html vs. print < tag? I don't think you are suppose to use a
name attribute, I think you just put the name of the parameter in the
tag.
in
When I try to execute the chunck of code (at the bottom of this page) from a
script in the browser, I receive the following error
Cannot execute: at nationalConsumerShoppingSurvey.pl line 129.
I have isolated to something having to do with this piece of the code:
'$participantEmail'
When I rep
I have a basic script using cgi.pm that is supposed to take one form filed
and pass it to a subroutine where I will validate the input. However, when
it gets passed, all that prints to the browser is a 1. Can anyone offer any
suggestions before I pull the rest of my hair out?
Here is the script:
As a relative newbie myself, it appears that you have in essence applied a
variable to a variable. I typically use the format
my $name=param("name");
when I have a form that has a field called name. This form field value
(andrew for example) would be stored in param("name") which is then stored
I am trying to use the following piece of code for subscribers to
unsubscribe from my mailing list. The problem is that when the user clicks
submit the file gets read into memory. If I open the file as open
(DELETEFILE, ">>" . etc., the list gets overwritten entirely with nothing.
It appears that
This is a newbie observation, but aren't you not supposed to name one of
your own variables with a number as the first value after a $, @, or % as in
the case of $2? Could this be part of the problem?
Andrew
-Original Message-
From: Marcelo Taube [mailto:[EMAIL PROTECTED]
Sent: Tuesday,
I wrote this script to back up a table in my mySQL database. It also names
the file with the exact time from the server that the backup occurred. It
might not be the best approach, but it worked for me as the only user. Just
adjust the column names to fit your needs.
When I posted a similar que
I just got it as well. If you click on the MSA logo, it takes you to this
page http://www.cpan.org/index2.html
What's going on?
Andrew
-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 7:44 PM
To: [EMAIL PROTECTED]
Subject: CPAN/Matt's???
Is
doh!
-Original Message-
From: Kevin Meltzer
To: Hughes, Andrew
Cc: [EMAIL PROTECTED]
Sent: 3/31/2003 8:07 PM
Subject: Re: CPAN/Matt's???
Some places around the world, it is April 1 ;-)
On Mon, Mar 31, 2003 at 07:47:47PM -0500, Hughes, Andrew
([EMAIL PROTECTED]) said something simil
I have a form that I am using to add data to a mysql database table. I am
using a .pl scrtipt to generate the html. I am using cgi.pm and param() to
insert the form data. And, I am using to the print<
Insider's Advantage