<form action="index.php" method="POST">
<input name="field1" type="text" />
<input type="submit" name="submit" value="Save Data">
</form>
<?php
field=$_POST["field1"]
exec('command 2>&1' $output);
print_r($output);
?>
I am trying to append field to the end of the exec. Field is variable and gets its value from the user by using html form. However I get server 500 error
probably because I am using it wrong.
I have tried:
exec('command 2>&1', $field, $output);
exec('command $field 2>&1', $output);
exec('command 2>&1', .$_POST["field1"]. $output);
How to use this properly?