i want to see the results of shell script in a textarea but i dont know how to do that, i try like this: php file:
<?php
function JTSstat(){
exec('sh JTSstat.sh', $output);
}
?>
...
<form action="5ondimba.php" method="post">
<input type="submit" value="STATUS" onclick="JTSstat()">
</form>
...
<textarea style="display:table-cell;width:100%;resize:none;"rows="7"readonly><?php echo $output ?></textarea>
but obviusly i receve this error:
PHP Notice: Undefined variable
EDIT:i know why it gives me this error, but i dont know how to do what i need.
what i need to do to do it? Thanks!