LWP not following redirect.
- Hello peoples...
I have a small issue with the LWP modules...
I have a script that is supposed to go and collect a page using LWP, it
When that same script is pointed to a perl script that displays HTML.. that
However, when that perl script prints a location redirect header, LWP seems
to take that header as the content and displays a blank page...
So my question is this.. .is it possible to tell LWP to follow the redirect
and collect the HTML of the resulatant location??
(which is in this case a PHP script...)
In other words, I am hoping there is some parameter to LWP that I can set
that will tell it to behave more like a browser and follow the location
if anyone knows anything about this, I'd dearly love to hear it..
I am looking through the LWP docs as we speak, but nothing I can find seems
to detail this...
- Hi Guys,
I have a database with a perl query script.
I have an HTML file which contains the following.
<!--#exec cgi="cgi-bin/prices.pl?code=000003" -->
the perl scrip looks like this.
#! c:/perl -w
$code=$input->param('code'); #product code
$dbh=DBI->connect('DBI:mysql:furniture') || die 'ERR: connect';
$query="SELECT price FROM benches WHERE code=?";
print "$code <--";
the database has stock codes and also has prices linked to the stock
codes. Im trying to get it to print the price from knowing the stock
code... can anyone tell me what could be wrong with the perl script ?
It was working in offline mode - IF I entered 000003 as the stock code -
it returned the correct price. But when running it thru the HTML page
with the #exec it returned "0 rows"
Help would be much appreciated. Thanks :)