I have this script in a separate file as my index.php.
I want to have a button that if pressed shows the results from my PHP script in the index.php, but when I use
<form action="../inc/script.php" method="post">
<input type="submit" value="Scan">
</form>
it just goes to the script.php page. how can I change it so it stays on index.php and print_r the array from the script on the index.php page?