by
304 14
1
5
2,119
1
Top 1% !
Popular
Famous
Specified
OpenSource
Popularity: 7670th place
Created
Modified Jun 29, 2014
No tags for this snippet yet.
LanguageText
LicenseMIT_X11

PHP to pass 'Get' data from HTML form into Python

Passes a code (action) and atime (duration) into Python
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/78386/PHP-to-pass--Get--data-from-HTML-form-in?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<?php $id1= $_GET['duration']; $id2= $_GET['action']; echo "duration", $id1; echo "action", $id2; exec( "sudo python /home/pi/arm/command.py $id1 $id2" ); /* Redirect browser */ $gohere = "http://192.168.169.15/index3G.html"; header("Location: $gohere"); /* Make sure that code below does not get executed when we redirect. */ exit; ?>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus