Reputation: 277
<?php
$time=$_GET[ 'time'];
$date=$_GET[ 'date'];
if($time !="" & $date !="" ){
$hour=s ubstr($time,0,2);
$minute=s ubstr($time,3,2);
$day=substr($date,8,2);
$month=substr($date,5,2);
$year=substr($date,0,4);
$execute=exec("python ..\alarm.py $year $month $day $hour $minute");
}
?>
<form action="index.php" method="get">
<input type='date' name='date'>
<input type='time' name='time'>
<input type='submit' value='setAlarm'>
</form>
So i am working on some Code that should do the following:
Right now, it all works without the reloading of the index.php. The file is being executed and after manually reloading the page, the index.php Shows me all running alarm.py scripts, which is all i want.
So is there a way, to force the reloading of the page, after the executing from php started?
Upvotes: 1
Views: 695
Reputation: 26
You can use "&" et the end :
exec("python ..\alarm.py $year $month $day $hour $minute &");
Upvotes: 1