Helpful Information
 
 
Category: PHP
Passing variable to cgi script

I have a mail form generated by php on a site where a user has to log in and the login name is session-registered. How can I pass the value of the login name along with the form data to the cgi script that sends the mail.

patrick

Hi, how is the user authenticated ? - if you are using HTTP_AUTHENTICATION (.htaccess) etc then the username should be available to the CGI via the CGI var $REMOTE_USER , else I suppose you could tag the username along as a POST var ?

need more info I think?

Hi Firepages,

I solved the problem by setting a hidden <input> element with the value of the login variable. Fairly obvious when I think about it, but I'm new to server-side and just gettign the hang of it.

thanks

Patrick










privacy (GDPR)