LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-03-2006, 06:04 PM   #1
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Passing a variable to a cgi script


I'm using a cgi script from dspam for users to view their quarantine. In order for the script to know which user is connecting, it needs to set the REMOTE_USER variable within the perl script.

What I want to know is if I can pass the REMOTE_USER variable into the cgi script simply by having users click on a hyperlink with their usernames on it.

I'll generate the list of usernames (each is a hyperlink that I can customize) by pulling the actual users from a mysql database.

Thanks for your help.
 
Old 04-03-2006, 10:02 PM   #2
ateam
Member
 
Registered: Jul 2004
Location: The State of Confusion
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
Be sure to include:

Code:
use CGI qw(:standard);
Then, do use a parameter as a variable within your script, something like this is needed:

Code:
$name = param('name');
The value for the variable "name" would be passed in a url in this fashion:

http://www.mysite.com/cgi-bin/displayname.cgi?name=Tom

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
passing command output to variable Infernal211283 Linux - Newbie 12 01-11-2006 05:54 AM
C++ / Passing a variable by reference to a class member function. sepulture Programming 12 11-15-2005 10:23 PM
Bash Script Passing variable to Function nutthick Programming 2 02-02-2005 05:15 AM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 02:18 PM
passing anonymous hash in CGI hidden field wonderdog33 Programming 1 01-30-2004 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration