This is my first question, CMIIW :
here my sample php script
<form method="GET" action="/var/www/cgi-bin/mode2.sh">
<table align="center" nowrap>
<tr>><td>IP address :</TD><TD><input type="text" name="ip"></td></tr>
<tr><td>netmask :</TD><TD><input type="text" name="ip2"></td></tr>
</tr></table>
<input type="submit" value="Send">
<input type="reset" value="Reset"></p></form>
bash script :
#!/bin/bash -x
echo "IPADDR=$ip" >>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "NETMASK=$ip2" >>/etc/sysconfig/network-scripts/ifcfg-eth0
I want input textbox value form web browser for example IP and netmask and send the value to bash and save to ifcfg-eth0 file. i know it sound risky, i just want to learn. any sugestion?