[Athens-pm] <a href="my_script.pl?argument1=string>Click this</a>
can't fix it!
Mark Pors
mark at dreamzpace.com
Wed Feb 26 16:19:32 CST 2003
This works for me if I call the script with '?goto_url=test':
#!/usr/bin/perl -w
use strict;
use CGI;
my $q = new CGI;
print $q->header();
my $goto_url = $q->param("goto_url");
my $user_pass = 1;
if ($goto_url eq 'test' and $user_pass) {
print $q->start_html(-title=>'It works').
$q->p(q(Ok it works)).
$q->end_html();
}
Identical to your code I'd say....
Mark
Antonis Faragitakis wrote:
> Oh sorry guys, i forgot some crucial instructions:
> i've already
> $goto_url = $cgi->param("goto_url");
> mark
> the problem is that when i click the link it displays
> me the message "you need to log in". that means that
> the code supposed that im not currently loged in.
> i'll attach the site to get the code entirely
>
> --- Mark Pors <mark at dreamzpace.com> wrote:
>
>>Antonis Faragitakis wrote:
>>
>>>hello everyone,
>>>
>>>can;t make it work:
>>>
>>>we have the following html code:
>>><a href="login.pl?goto_url=test">Click this</a>
>>>
>>>and the perl code:
>>>$cgi->param("goto_url");
>>>
>>
>>I think you gotto do:
>>$goto_url = $cgi->param("goto_url");
>>
>>mark
>>
>>
>>>if ($goto_url eq 'test' and $user_pass) {
>>> $cgi->start_html(-title=>'It works').
>>> $cgi->p(q(Ok it works)).
>>> $cgi->end_html();
>>>}
>>>
>>>ok i know this code sucks, but i cant think
>>
>>something
>>
>>>better than this!
>>>any help please!
>>>
>>>Antonis!
>>>
>>>_______________________________________________
>>>Athens-pm mailing list
>>>Athens-pm at mail.pm.org
>>>http://mail.pm.org/mailman/listinfo/athens-pm
>>>
>>>
>>
>>
>>_______________________________________________
>>Athens-pm mailing list
>>Athens-pm at mail.pm.org
>>http://mail.pm.org/mailman/listinfo/athens-pm
>
More information about the Athens-pm
mailing list