I have two rather simple files. The first is an HTML-file like this:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<html>
<body>
<form action="test.php" method="post">
Search for: <input type="text" name="search" />
<input type="submit" name="submit" value="Search" />
</form>
</body>
</html>
The second file is test.php and it looks like this:
<?
$filepath = "/usr/sbin";
exec("ONE $search -command $filepath ");
fopen($filepath, rw);
?>
My problem is that I want to use the argument "search" given in the HTML-form as value of variable in the PHP-script. ONE is a search script I made that takes one argument and I want it to be "$search".
Could this be done and if so how?
Many thanks in advance.
$_POST["search"], I think. But be very wary about taking user-entered data and passing it into anexeccall.