Estou usando via web, eis o codigo:
<?php
include("conexao.php");
include("style.php");
$ref=1;
if($_POST['host']=="" && $_GET['get2'] != ""){
$oid = $_GET['get1'];
$host = $_GET['get2'];
$comm = $_GET['get3'];
$oid2 = $_GET['get4'];
$ref = $_GET['get5'];
}else{
$oid = $_POST['oid'];
$host = $_POST['host'];
$comm = $_POST['comm'];
$oid2 = $_POST['oid2'];
}
if($ref){
$descr = snmpget($host, $comm, $oid2);
}
?>
<center><a href="index.php">HOME</a></center><br/>
<form method="post" action="set.php">
<input type ="hidden" name="host" value=<?php echo $host;?>>
<input type ="hidden" name="comm" value=<?php echo $comm;?>>
<input type ="hidden" name="oid" value=<?php echo $oid;?>>
<table width=500 border=3 cellspacing=2 cellpadding=2 bgColor="#ffffff" align=center>
<tr><td align=right>OID: </td><td> <input type=text name="oid2" value=<?php echo $oid2;?>></td></tr>
<tr><td align=right>Valor: </td><td> <input type=text name="valor" value=<?php echo $descr;?>></td></tr>
<tr><td align=right>Novo Valor: </td><td> <input type=text name="nValor" ></td></tr>
<tr><td align=right>Tipo Valor:</td><td><select name="tipo">
<?php
$sql_tipo = "SELECT nome, tipo FROM tipovalor;";
$r = mysql_query($sql_tipo)or die ("Houve erro na coleta dos dados".mysql_error());
while ($linha = mysql_fetch_array($r)){
?>
<option value=<?php echo $linha["tipo"];?>><?php echo " $linha[nome] ";?></option>
<?php
}
?>
</select></td></tr>
<tr><td align=center colspan=2><input type="submit" value="SET">
<input type="button" value="GET" onclick='window.location.href="set_get.php?get1=<?php echo $oid;?>&get2=<?php echo $host;?>&get3=<?php echo $comm;?>&get4=<?php echo $oid2;?>&get5=1"'></td></tr>
</table>
</form>
<center><a href="walk.php?oidVoltar=<?php echo $oid;?>&hostVoltar=<?php echo $host;?>&commVoltar=<?php echo $comm;?>">Voltar</a></center><br/>