Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/09/2008, 15:01
yowmy
 
Fecha de Ingreso: enero-2008
Mensajes: 62
Antigüedad: 16 años, 2 meses
Puntos: 0
ayuda con variables de formulario

tengo un formulario en html que en mi pc localemente me funciona de maravilla pero cuando la subo al server no me pasan las variables el codigo del archivo que recive las variables es este:


<?php

include ("main.php");

$codigo = $_GET['codigo'];
$nombre = $_GET['nombre'];
$descripcion = $_GET['descripcion'];
$categoria = $_GET['categoria'];
$peso = $_GET['peso'];
$precio = $_GET['precio'];
$piezas = $_GET['piezas'];
$existencia = $_GET['existencia'];
$tabla = $_GET['tabla'];
$file = $_GET['file'];

if(!$codigo || !$nombre || !$descripcion || !$categoria || !$peso || !$precio || !$piezas || !$existencia || !$tabla || !$file)
{

echo "error 0";
echo "<a href=index.html>Volver</a>";
die();
}
else
{

$codigo= addslashes($codigo);
$nombre = addslashes($nombre);
$descripcion = addslashes($descripcion);
$categoria = addslashes($categoria);
$peso = addslashes($peso);
$precio = addslashes($precio);
$piezas = addslashes($piezas);
$existencia = addslashes($existencia);
$tabla = addslashes($tabla);


$db = conexion();
$cons = consulta_categoria_2($tabla, $categoria);
if(!$cons)
{
echo "error";
exit;
}
$row = mysql_fetch_array($cons);
$a = htmlspecialchars(stripslashes($row['codigo']));
echo $a;

$result = add_carne_producto($codigo, $nombre, $descripcion, $categoria, $peso, $precio, $piezas, $existencia, $a, $tabla);
foto($codigo);

}

?>


y el de el formulario es este:


<form method="post" action="addform_g.php" enctype="multipart/form-data"><div align="left">
<table width=306 border=0 class=border>
<tr>
<th width=74 align=left><span class=resetas>Codigo</span></th>
<td width=222><input type=text name=codigo readonly value=<?php echo $v = rand(10,1000000000); ?>></td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Nombre</span></th>
<td width=222><input type=text name=nombre></td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Categoria</span></th>
<td width=222><?php menu($num, $cons); ?></td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Peso (Lb)</span></th>
<td width=222><input type=text name=peso></td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Precio $</span></th>
<td width=222><input type=text name=precio> </td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Piezas</span></th>
<td width=222><input name=piezas type=text></td>
</tr>
<tr>
<th width=74 align=left><span class=resetas> Existencia</span></th>
<td width=222><input type=text name=existencia></td>
</tr>

<tr>
<th><span class=resetas>Descripcion</span></th>
<td><textarea name=descripcion cols=35 rows=5 value=></textarea></td>
</tr>
<tr>
<th><span class=resetas>Imagen</span></th>
<td><input type="file" name=file></td>
</tr>

<tr>
<td colspan=2 align=center>

<input type=hidden name=tabla value=<?php echo $tabla; ?>>
<input type=submit value=Aceptar align=middle>&nbsp;
<input type=reset value=Borrar align=middle>

alguien que me ayude porfavor!