?
Solved

CGI outputting FLASH POST variable

Posted on 2003-10-23
2
Medium Priority
?
263 Views
Last Modified: 2013-12-25
I have an issue with a CGI script (I think). What I'm trying to do is actually a workaround to something that will not work in Flash. I've come to the conclusion based on this site (and others) that a Perl CGI call is the best solution.

Basically, I'm sending one variable that contains the text to generate a web page. I want the CGI script to take this one variable and output it That's it. The code that creates the html text is in Flash. The meat of the content is created within a "for" loop and recursively added to this one variable.

I get the new page and I get the start and ending tags of the page, but I only get the last text item in the loop to appear. I did a "trace" on the variable in Flash and all the text is there, so I'm going on the assumption that my CGI script is wrong. It's a simple script (with an included library file) that I downloaded from another site and I honestly don't understand everything that's going on in it. I believe that the library file contains a script to parse the POSTed variable.

Can someone please post an example of how to read a posted variable and display it using a Perl CGI script?

Thanks!
0
Comment
Question by:jtlyonsden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
inq123 earned 500 total points
ID: 9609588
replace the "myvar" in "param('myvar')" below with the name of your variable.  If your variable's like <input type=text name=abc value=12345> then replace "myvar" with "abc" (I guess I don't need to explain in such detail but it doesn't hurt).  The code begins below:

#!/usr/bin/perl

use CGI qw/:standard/;

if (param())
{
 print header,
       start_html('display variable'),
       h1("Here is the variable:".param('myvar')."\n");
       hr;
}
0
 

Author Comment

by:jtlyonsden
ID: 9610372
Thanks for the help. I actually figured this one out in the meantime. I just altered the library script a little and it now works.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

762 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