Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/09/2012, 19:23
lleger1993
 
Fecha de Ingreso: septiembre-2012
Mensajes: 4
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: Llamar una funcion desde un boton.

Disculpeeen mirenlo aqui


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form method="post">
<div name="header">
<h1>Ejecutar Comando</h1>
</div>

<div name="contenido">

<select name="tbLocalidad">
<option value="tC" >To</option>
<option value="tSe" >Tor</option>
</select>
Mac Adrres:<input type="text" name="tfMac" value="Aqui"/><br>
<button name="bAgregar" onclick="ejecutarComando(<?php $_POST["fname"]; ?>)">Agregar</button>
<button name="bEliminar" >Eliminar</button>

</div>

</form>


</body>
<?php


function ejecutarComando($directorio){
$comando = "mkdir ".$directorio;
exec($comando);
echo $comando;
}

?>
</html>