You can just use:
sleep(5);
print "Location: $location\n\n";
This way you won't even need the CGI module to be used.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Admin-Stress" <[EMAIL PROTECTED]>
To: "perl cgi" <[EMAIL PROTECTED]>
Sent
I thought the browser automaticly replaces the & signs and other special
characters with their hex value, like %20 for space.
Isn't the & character replaced?
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "John Stokes" <[EMAIL PROTECTED]>
T
Thanks guys, that was only part of the script.
I am using CGI::Carp qw( fatalsToBrowser );
There are no errors in any of the apache logs, nor from Perl.
This is why I'm struggling to find the source of the problem.
I'm also doing this
print "Content-type: text/html\n\n";
but like so
print $q->h
Do you know what browser(s)? Most browsers should encode the & as "%26"
and then your split would work properly. On a side note why re-invent
the wheel, when it has already been invented lots of times, see CGI
module on CPAN, or any one of the hundreds of CGI sites that give you
source code t
If I do that, then all of them would be replaced and I'd have the same
problem with the - then.
How do I distinguish between an & that HTML inserted as a delimiter vs. an &
the user entered? (or an =, for that matter)
-John
On 12/9/02 4:50 PM, "Sven Bentlage" <[EMAIL PROTECTED]> wrote:
> Hi Joh
Hi John
why don`t you use a small regex to replace the & ?
Something like :
if ($variable =~ m/&/) {$variable =~ s/&/-/g}
should replace the ampersand with a "-". (I am not quite sure if you
have to write & or \& )
Cheers,
Sven
(P.S.: I am definitely sure there are much faster, shorter an
I have an ongoing problem.
As you know, HTML encodes GET and POST requests using the format:
"myurl.com?name1=value1&name2=value2&..."
My problem is, I have users constantly using ampersands (&) in text fields
(ex: John & Jane Doe), so my data comes across as:
"?name1=value1&name2=val&ue2=&name3=
if ($password ne $upassword) {
print "Location: /pages/login.htm\n\n";
} else {
print "Location: /pages/yourpage.htm\n\n";
}
Something like that may work.
-Original Message-
From: "Scot Robnett"<[EMAIL PROTECTED]>
To: "Admin-Stress"<[EMAIL PROTECTED]>, "perl cgi"<[EMAIL PROTECTED
First thing, if you are generating a redirect, then you can print the
content-type header within the same space using an array ref like below.
Your method looks like it should work, although I think you might want to
put the time and the URL within the "content" space.
With my host I'm getting an
I'm in desperate need of help. I have a website on a
third party hosting company server using IIS and I
have the libwww 5.53 source files copied into my
website directory in (/include/libwww). I've written
an ASP script that allows me to perform HTTP requests
and it works great. Here is a copy of
> I just want to make a 'secure site' that need username and password.
The easiest way to do this is probably not in perl. I recommend putting an
".htaccess" file in the directory where you have the file that you want
password protected. This is a good method if you do not have the ability to
c
print $query->redirect(-uri=>'http://somewhere.else/in/movie/land',
-nph=>1);
I found the example, but I dont know how to put the 'seconds', like will be redirected
after 5
seconds.
--- Scot Robnett <[EMAIL PROTECTED]> wrote:
> You might want to just use redirec
Merritt,
Works as expected in the console, but not in the browser?
Let me introduce you to a friend of mine
use CGI::Carp qw( fatalsToBrowser );
Your script operates under different permissions in the console and the
browser. Look at the Apache error log (and use cgi carp) to get a better
Idea
You might want to just use redirect(), check perldoc CGI
-
Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
-Original Message-
From: Admin-Stress [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 2:42 PM
To: perl cgi
Subject: html redirect using CGI.pm
Hi,
Could s
Hi,
Could someone check my code below? I need to redirect to a html using CGI.pm perl
module. But when
I executed, I got blank page. If I commented out $cgi->start_html ... it's working
fine, but no
redirection.
$cgi = new CGI;
sub Error {
my ($msg) = @_;
print "";
print "";
print " Err
Hi everyone,
I am using MIME::LIte to send out several mails a month. Due to
problems with several providers (i.e. not displaying HTML correct) I
switched to text only. Now I received this error message (see below)
from one of the people on the mailing list.
Does anyone of you maybe know:
- wh
In the beginning of your script, put:
print "Content-type: text/html\n\n";
This is because the browser need to know what content type is being printed,
and in the shell all is the same, so you don't need it. Anyway, any web page
you request is declared with a content type, but this is automatic
Yupe, thanks, I forgot to reload the browser after I changed to POST method.
silly me!
Sorry for consuming your bandwidth.
thanks
--- "Kipp, James" <[EMAIL PROTECTED]> wrote:
> try using the POST method, instead of GET ?
__
Do you Yahoo!?
Yahoo! M
Sorry about the vague topic, don't know how to describe the problem.
My code runs OK in the console and does what it is meant to do. In the
browser it doesn't die or give any errors, but only does about half of
what it is meant to do before it magically stops with no errors.
If you look at the be
try using the POST method, instead of GET ?
-Original Message-
From: Admin-Stress [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:16 AM
To: perl cgi
Subject: how to hide form parameter from displayed in browser ?
I made a simple html form to input a password field :
http://
I made a simple html form to input a password field :
http://mydomain.homelinux.net/cgi-bin/login.pl";
method="GET">
Password :
And a cgi to compare that password :
#!/usr/bin/perl
use CGI;
print "Content-type: text/html\n\n";
$cgi = new CGI;
$upassword = $cgi->param('password');
$passwo
21 matches
Mail list logo