Thanks a lot for your code

I have copied your codes to a php file (see below), but when i want's to set the "set temperature"
with the pulldown menu nothing writes to the thermostat file

It only shows the current "set temperature" i wrote manualy to the file and the current temperature
The only thing that's not working is the set function.
I'm a newbie in programming and this is the last problem i'm strugling with.
Can you help me out on this??
Many thanks
Ruud
<?php echo exec('python /var/bin/gettemp.py 2>&1'); ?>
<?php
if(isset($_POST["settemp"])) {
$settemp = $_POST["settemp"];
$fp = fopen("/var/bin/thermostat", "w+");
$savestring = $settemp;
fwrite($fp, $savestring);
fclose($fp);
}
?>
<form name="termostat" method="post" class="label-top" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div>
<label for="settemp" class="inline">Temperature set at</label>
<select name="settemp" id="settemp" onChange="this.form.submit()">
<option value=null SELECTED><?php $curSet = file_get_contents('/var/bin/thermostat'); echo $curSet; ?> graden </option>
<option value="21.5">High(21.5)</option>
<option value="20.0">20</option>
<option value="19.5">Home(19.5)</option>
<option value="19.0">19</option>
<option value="18.5">18.5</option>
<option value="15.5">15.5</option>
<option value="15.0">Away(15)</option>
<option value="14.5">14.5</option>
<option value="10.0">Low(10)</option>
</select>
</div>
</form>