Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,058
    Thanks
    10
    Thanked 96 Times in 94 Posts
    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?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •