Solved

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

Posted on 2000-05-11
5
167 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
Comment Utility
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
Comment Utility
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
Comment Utility
Adjusted points from 85 to 90
0
 

Author Comment

by:camasuvi
Comment Utility
yeah, this is my fault.
thanks.
0
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
most welcome :-)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now