Solved

send variables(at least two) from cgi to perl script does not work

Posted on 2000-05-11
5
171 Views
Last Modified: 2010-03-05
when i send variables from a cgi scipt to another perl script i make a mistake i think.
at work it works whereas at home the same file does not work.

i have two variables and sending them to perl script as;
<img src=sample51.pl?arama=$ara;timelimit=$timelimit>
and in perl script;

$query = new CGI;
$aranan = $query->param('arama');
$timelimit = $query->param('timelimit');

i use that method in order to get variables. but all variables are in the $aranan variable.
f.e. if timelimit=3 and ara=EM (in cgi)then $aranan (in perlscript) becomes EM;3 whereas $timelimit is NULL.

What can be problem?
Thanks in advance.
0
Comment
Question by:camasuvi
  • 2
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
maneshr earned 90 total points
ID: 2802105
you need to have a & between the two variables instead of ;

i.e

<img src=sample51.pl?arama=$ara;timelimit=$timelimit>

SHOULD BE...
<img src=sample51.pl?arama=$ara&timelimit=$timelimit>

0
 

Expert Comment

by:ihunter
ID: 2802338
Also, if this works at the office and not at home, are you using the same Web server?  A less robust web server may not handle certain CGI requests the same as a full blown Apache/IIS web server.
0
 

Author Comment

by:camasuvi
ID: 2803254
Adjusted points from 85 to 90
0
 

Author Comment

by:camasuvi
ID: 2803255
yeah, this is my fault.
thanks.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2804474
most welcome :-)
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question