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
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Text box entry used as a variable

    Noob here; I have a text box in a html page and ideally I would like to take user input from this box and use it as a variable in a shell or perl script.

    The only way Ive seen this attempted was with a /cgi-bin .cgi script but I don't have root access so I haven't been able to get this to work.

    Is there any other way to use the input as a variable?

    Any help is much appreciated.

  • #2
    New Coder
    Join Date
    Sep 2011
    Posts
    61
    Thanks
    9
    Thanked 1 Time in 1 Post
    You can use PHP instead and then use the exec() function to execute a shell script or perl script for that matter.
    If you use a HTML form using the post method, you will be able to get this information using $_POST['field name'].
    Need help?
    I work with the following languages:
    HTML: Professional - PHP: Professional - Visual C#: Average - CSS: Average - ASP: Please don't hurt me! ;(
    Currently practicing: Visual C#

  • #3
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the reply.

    When you say use php do you mean use a .php file in place of the cgi-bin file in the

    <form method="post" action="/whatever/whatever.php">?

    If so will this work in any directory?


    Thanks


  •  

    Posting Permissions

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