Hello thanks for your responce, i will look into putting radio buttons as my final design needed that.But i am not sure i know how to send the correct value associated with it.
My final version of the wed page was to do this---
The "index.php" page redirects me to lighton1.php when i click the ON button. When i go to "lighton1.php" the page runs a script and it finishes.
what i want to do is rather than creating another page lightoff1.php, I have one page let say Inprogress.php which receives a value from "index.php" say "L11" and parses that $varname to the ./dosomething.out .$varname.
And once it finishes it redirects the back to the index.php.
let me know if you know how to do this.
I really appreciate your help. thanks
------------------------------------------------------------------------------------------------------------------
- index.php
-
-
<html>
-
<body>
-
-
-
<br>Light1:
-
<form action = "lighton1.php " method ="post"> <input type = "submit" value="ON"/> </form>
-
<form action = "lightoff1.php " method ="post"> <input type = "submit" value="OFF"/> </form>
-
</br>
-
-
</body>
-
</html>
-
-
lighton1.php
-
-
<html>
-
<head/>
-
<body>
-
<h2> Success </h2>
-
<?php
-
print 'Light is turned ON';
-
$var_name = "L11";
-
echo shell_exec("./send.out ".$var_name);
-
?>
-
</body>
-
</html>
-