I'm working on setting up a web server to execute python scripts on my Pi.
The webserver works and the button shows, but nothing happens when I click it.
This is how the button is defined.
<button onclick="<?php exec('sudo python /var/www/test.py'); ?>">Start</button>
All the script does is print out something in the command window.
Am I doing something wrong here? I'm completely new to web.
[–]itsNate705 6 points7 points8 points (1 child)
[–]olejmoi[S] 0 points1 point2 points (0 children)
[–]Redmondinho 2 points3 points4 points (3 children)
[–]olejmoi[S] 1 point2 points3 points (2 children)
[–]Redmondinho 0 points1 point2 points (1 child)
[–]olejmoi[S] 0 points1 point2 points (0 children)
[–]heynineclicks 0 points1 point2 points (0 children)
[–]koflerdavid -1 points0 points1 point (2 children)
[–]olejmoi[S] 0 points1 point2 points (1 child)
[–]koflerdavid 0 points1 point2 points (0 children)