I´m working on a raspberry pi with debian and I want to execute a python script in a html script with a button. Also I´m using apache2 for the website.
I´m a beginner and tried to do it with jquery and django, but both did not worked.
Some code where I stopped last:
<form method="post">
<input type="submit" value="GO" name="GO">
</form>
<script language="php">
if(isset($_POST['GO']))
{
shell_exec("/var/www/start.py");
}
</script>
Their are no errors, but the code of the script does not get executed. I checked the python script and it´s fine. Also the button works.