Making a simple PHP Form?

  • Thread starter Thread starter robbo862
  • Start date Start date
R

robbo862

Guest
Hello.

I want to pass a simple variable from a HTML form to a PHP script.

Below is the HTML Form:-
===
<form id="Form1" action="test.php" method="post">
Folder to create: <input type="text" name="$DIR" /><br/>
<input type="Submit" name="Form1_Submit" value="Login" />
</form>
===

Below is the PHP Script in a seperate file:-
===
<?php
$result=shell_exec("/home/anthony.robinson/tools/makedir $DIR")
echo($result);
?>
===

What I want is for the $DIR in the PHP Script to be whatever is typed into the $DIR field within the HTML Form.

Is this possible?

Thanks.
 
Back
Top