I'm working on a project for my school for modifying basic wireless parameters in a linux router with commands just using HTML GUI. I worked mostly with php. So far i've been going fine but now i'm stuck and i cannot find any clear solution for my little problem.
I have the following drop down:
<form method="post" action="changefrequency.php">
<select name="freq">
<option value="auto">Auto</option>
<option value="2412">Channel 1</option>
<option value="2417">Channel 2</option>
<option value="2422">Channel 3</option>
<option value="2427">Channel 4</option>
<option value="2432">Channel 5 </option>
<option value="2437">Channel 6</option>
<option value="2442">Channel 7</option>
<option value="2447">Channel 8</option>
<option value="2452">Channel 9</option>
<option value="2457">Channel 10</option>
<option value="2462">Channel 11</option>
<option value="2467">Channel 12</option>
</select>
<input type="submit" value="Set Frequency"/>
</form>
</div>
I post the value let's say option 2432 (channel5) to a router via php scripting with the command inside it using FTP upload and it works fine. I have made a script which automatically download in a txt file the frequency. So let's say user selected from the HTML and submited in the drop down channel 5 with value 2432 i will get locally saved a txt that has 2432 or frequency=2432 inside it.
Now my question is how can we check what value will it be inside the txt file and put it as default value for my dropdown? So any time the user changes the frequency the default value will be change in the dropdown menu.
thanks!