Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/12/2010, 14:23
arturograjeda
 
Fecha de Ingreso: diciembre-2010
Mensajes: 7
Antigüedad: 13 años, 5 meses
Puntos: 0
ayuda con php/mysql

quiero entrar un valor a la base de datos pero me sale el error :

Warning: Missing argument 1 for AgregaMacReg(), called in C:\AppServ\www\xxi\agregamaquina.php on line 11 and defined in C:\AppServ\www\xxi\funciones\reportes.php on line 15

aqui dejo el script que estoy usando, alquien me podria ayudar a resolver el error. se lo agradeceria mucho..

aqui dejo reportes.php

<?php
function AgregaMac(){
$form .= '<form name="form1" method="post" action="">';
$form .= '<table width="40%" border="1" align="center" cellpadding="0" cellspacing="0">';
$form .= '<label>Nombre Maquina</label>';
$form .= '<input class="text-input small-input" type="text" name="Descripcion" />';
$form .= '<input type="submit" value="enviar" />';
$form .= '</table>';
$form .= '</form>';
return $form;
}



function AgregaMacReg($parametros){
$conexion = new clsConexion();
$Descripcion = $parametros['Descripcion'];
$resul = $conexion->ejecutarQuery("INSERT INTO maquinaria(Descripcion) values('$Descripcion')");
echo "<script>alert('OK');</script>";
}
?>



agregamaquina.php:

<?php
if($_POST){
AgregaMac($_POST);
}
echo AgregaMacReg();

?>