<?
if ($ok==1){
$result2=mysql_query("select * from loto_admin_vars2 order by id",$cnct);
for ($i=0;$i<mysql_num_rows($result2);$i++){
$data=mysql_fetch_object($result2);
$res=mysql_query("update loto_admin_vars2 set val='".$p[$data->id]."' where id='$data->id'",$cnct);
}
}

$result=mysql_query("select * from loto_admin_vars2 order by id",$cnct);
echo '<form method="post" action="">
<input type="hidden" name="ok" value="1">
<input type="hidden" name="pass" value="'.$pass.'">
<input type="hidden" name="login" value="'.$login.'">
<input type="hidden" name="incl" value="'.$incl.'">';
for ($i=0;$i<mysql_num_rows($result);$i++){
$data=mysql_fetch_object($result);
echo $data->COMMENT.' <input type="text" name="p['.$data->id.']" value="'.$data->val.'" class=select><br>';
}
echo '<br><input type="submit" value="Подтвердить" class=submit>';
?>