View Full Version : Text box entry used as a variable

06-13-2012, 11:23 AM
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.

Time Sheep
06-13-2012, 12:59 PM
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'].

06-13-2012, 02:42 PM
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?