Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Mysql »

ayuda con php/mysql

Estas en el tema de ayuda con php/mysql en el foro de Mysql en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 14/12/2010, 14:23
 
Fecha de Ingreso: diciembre-2010
Mensajes: 7
Antigüedad: 13 años, 4 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();

?>
  #2 (permalink)  
Antiguo 15/12/2010, 02:17
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Respuesta: ayuda con php/mysql

Esto no es bbdd es php allí te lo solucionaran mejor, pero fijate

...Missing argument 1 for AgregaMacReg()... falta un argumento para la funcion

....

function AgregaMacReg($parametros)

....

echo AgregaMacReg();

Quim

Etiquetas: php-mysql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:03.