Scusami, provo a postare il codice.
Non volevo blagare dicendo che sono programmatore ....
Nel frattempo ho provato a fare tutto in una pagina sola.... ecco la pagina...
Sicuramente mi lincerete per il codice... abbiate pazienza sono in una fase di prove.....
<HTML>
<HEAD>
<!-- Created with AOLpress/2.0 -->
<STYLE type="Text/css">
<!--
h6{
font-family: Arial, helvetica, sans-serif;
font-size: small;
font-weight: normal;
color: #000000;
}
-->
</STYLE>
<TITLE>Please title this page. (Page 1)</TITLE>
</HEAD>
<?
Function AggiornaFile()
{
$ip = "pippo";
if($handle = fopen("file.txt", "wt"))
{fprintf($handle,"IP %s\n",$ip);
fprintf($handle,"MSK %s\n",$msk);
fprintf($handle,"GW %s\n",$gw);
fclose($handle);
}
else
messagebox("aaa");
return 0;
}
?>
<?php
$contents = "";
echo "<h1>Parametri impostati da utente</h1>";
if($handle = fopen("file.txt", "rt"))
{
$userinfo = fscanf($handle, "IP %s\n");
if ($userinfo)
{
list ($ip) = $userinfo;
}
$userinfo = fscanf($handle, "MSK %s \n");
if ($userinfo)
{
list ($msk) = $userinfo;
}
$userinfo = fscanf($handle, "GW %s \n");
if ($userinfo)
{
list ($gw) = $userinfo;
}
fclose($handle);
if ($ip == 'AUTO')
{
$ip = '';
$msk = '';
$gw = '';
}
}
else
{
messagebx("aaa");
}
?>
<BODY style="background-image: url(sfondo02.jpg); background-repeat:no-repeat; background-position: center top;">
<TABLE width="400" BORDER="1" CELLSPACING="0" CELLPADDING="0" align="center">
<TR>
<TD width="200"><H6>
<STRONG> IP Address </STRONG>
</H6>
</TD>
<TD width="200">
<input type="text" name=$ip value = <? print $ip;?> >
</TR>
<TR>
<TD width="200"><H6>
<STRONG> Subnet Mask </STRONG>
</H6>
</TD>
<TD width="200">
<input type="text" name=$msk value = <? print $msk;?> >
</TR>
<TR>
<TD width="200"><H6>
<STRONG> GateWay</STRONG>
</H6>
</TD>
<TD width="200">
<input type="text" name=$gw value = <? print $gw;?> >
</TR>
</TABLE>
<TABLE width="400" BORDER="1" CELLSPACING="0" CELLPADDING="0" align="center">
<TR>
<TD align="center"><H6>
<BR>
<INPUT type="SUBMIT" value="Salva" name="Salva" onclick = <?AggiornaFile();?>>
<BR>
<INPUT type="submit" value="Leggi" name="Salva" onclick =
<?php
echo "Address IP: $ip\n";
echo " SUBNETMASK : $msk\n";
echo " GATEWAY : $gw\n";
} ?>
>
</H6>
</TD>
</TR>
</TABLE>
<P>
</BODY></HTML>