Código HTML:
<FORM action="furgonetas.php" method="post" border="0"> <p class="txtgris"><img src="images/alquilerfurgos.jpg" width="217" height="19" /></p> <table width="425" height="112" border="0" cellspacing="0"><tr><td width="17%"><table width="425" height="112" cellspacing="0" > <tr> <td width="14%" class="menupeke"> </td> <td colspan="4"><? generagrupos(); ?></td> <td><label></label></td> </tr> <tr> <td class="menupeke">Provincia</td> <td width="34%"><input name="accion" type="hidden" id="accion" value="search" /> <? generaMarcas(); ?></td> <td width="34%" class="menupeke"><div align="center">Fecha recogida</div></td> <td width="17%"><input name="Frecogida" type="text" id="Frecogida" onfocus="this.select();lcs(this)" onclick="event.cancelBubble=true;this.select();lcs(this)" value="dd/mm/yy" size="12" /></td> <td width="3%" class="menupeke"> H.</td> <td><select name="Hrecogida" id="Hrecogida"> <option value="00:00">00:00</option> <option value="01:00">01:00</option> <option value="02:00">02:00</option> <option value="03:00">03:00</option> <option value="04:00">04:00</option> <option value="05:00">05:00</option> <option value="06:00">06:00</option> <option value="07:00">07:00</option> <option value="08:00">08:00</option> <option value="09:00">09:00</option> <option value="10:00">10:00</option> <option value="11:00">11:00</option> <option value="12:00">12:00</option> <option value="13:00">13:00</option> <option value="14:00">14:00</option> <option value="15:00">15:00</option> <option value="16:00">16:00</option> <option value="17:00">17:00</option> <option value="18:00">18:00</option> <option value="19:00">19:00</option> <option value="20:00">20:00</option> <option value="21:00">21:00</option> <option value="22:00">22:00</option> <option value="23:00">23:00</option> </select></td> </tr> <tr> <td class="menupeke">Oficinas</td> <td><select disabled="disabled" name="oficina" id="oficina"> <option value="0">Selecciona</option> </select></td> <td class="menupeke"><div align="center">Fecha Entrega</div></td> <td><input name="Fentrega" type="text" id="Fentrega" onfocus="this.select();lcs(this)" onclick="event.cancelBubble=true;this.select();lcs(this)" value="dd/mm/yy" size="12" /></td> <td class="menupeke">H.</td> <td><div > <select name="Hentrega" id="Hentrega"> <option value="00:00">00:00</option> <option value="01:00">01:00</option> <option value="02:00">02:00</option> <option value="03:00">03:00</option> <option value="04:00">04:00</option> <option value="05:00">05:00</option> <option value="06:00">06:00</option> <option value="07:00">07:00</option> <option value="08:00">08:00</option> <option value="09:00">09:00</option> <option value="10:00">10:00</option> <option value="11:00">11:00</option> <option value="12:00">12:00</option> <option value="13:00">13:00</option> <option value="14:00">14:00</option> <option value="15:00">15:00</option> <option value="16:00">16:00</option> <option value="17:00">17:00</option> <option value="18:00">18:00</option> <option value="19:00">19:00</option> <option value="20:00">20:00</option> <option value="21:00">21:00</option> <option value="22:00">22:00</option> <option value="23:00">23:00</option> </select> </div></td> </tr> </table></td> </tr> </table> <p align="center"> <input type="submit" name="button" id="button" value="Enviar" /> </p> <label></label> </FORM>
Código PHP:
<?php
$name=utf8_decode($_POST['realname']);
$Frecogida=utf8_decode($_POST['Frecogida']);
$Fentrega=utf8_decode($_POST['Fentrega']);
$Hrecogida=utf8_decode($_POST['Hrecogida']);
$Hentrega=utf8_decode($_POST['Hentrega']);
$provincia=utf8_decode($_POST['provincia']);
$grupo=utf8_decode($_POST['grupo']);
$oficina=utf8_decode($_POST['oficina']);
include ("conexion.php");
$con = conectar ();
if (isset($_REQUEST['accion'])) {
switch ($_REQUEST['accion']){
case "add": anadir($con);break;
case "del": borrar($con);break;
case "list": listar($con,0);break;
case "edit": editar($con);break;
case "view": mostrar($con);break;
case "save": guardar($con);break;
case "pass1": paso1($con);break;
default: listar($con,0);break;
}
}
else {
listar($con,0);
} function listar($con,$el_id)
{
echo "<center>";
$SQL_listar="SELECT * FROM grupofurgonetas ORDER BY 'id' DESC";
$listar=@mysql_query($SQL_listar,$con) or die ("<p class=\"MSG\">¡ERROR! Ha ocurrido un error al intentar listar los registros</P>");
$n_registros=mysql_num_rows($listar);
//Si no existen registros en la tabla (tabla vacia)
if ($n_registros == 0) {echo "<p class=\"MSG\">No existen registros en la base de datos</P>";}
else //Si existen registros en la tabla
{
echo "<table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Telefono de contacto:</strong> </td><td>".$name."".$grupo."</td></tr></table><br>";
echo "<table class=\"list\">
<thead>
<tr>
<td class=\"menupeke\" style=\"width:20px;\"></td>
<td class=\"menupeke\" style=\"width:100px;\"></td>
<td class=\"menupeke\" style=\"width:200px;\">Grupo</td>
<td class=\"menupeke\" style=\"width:110px;\">Plazas</td>
<td class=\"menupeke\" style=\"width:110px;\">Puerta Trasera</td>
<td class=\"menupeke\" style=\"width:110px;\">Largo</td>
<td class=\"menupeke\" style=\"width:110px;\">Carga</td>
<td class=\"menupeke\" style=\"width:100px;\">Carga</td>
</tr>
<thead>
<tbody>";
while($registro = mysql_fetch_array($listar))
{
if ($usu_id!=$registro['id']) {echo "<tr onmouseover=\"this.bgColor='#EEEEEE'\" onmouseout=\"this.bgColor='#FFFFFF'\">";}
else {echo "<tr style=\"background-color:#000000;\">";}
$SQL_cat="SELECT nombre FROM furgonetasgrupo WHERE id=".$registro['grupo']."";
$cat=@mysql_query($SQL_cat,$con) or die ("<p class=\"MSG\">No se pudo mostrar la categoría</P>");
$aux_cat = mysql_fetch_array($cat);
$la_marca = $aux_cat['nombre'];
echo " <td class=\"txtlista\" style=\"text-align:center;\"></td>
<td class=\"foto\"><img src=\"images/th_".$registro['foto']."\"></td>
<td class=\"txtlista\" style=\"text-align:center;\">".$la_marca."<br />".$registro['info']."</td>
<td class=\"txtlista\" style=\"text-align:center;\">".$registro['plazas']."</td>
<td class=\"txtlista\" style=\"text-align:center;\">".$registro['maletero']."</td>
<td class=\"txtlista\" style=\"text-align:center;\">".$registro['largo']."</td>
<td class=\"txtlista\" style=\"text-align:center;\">".$registro['carga']."</td>
<td class=\"listdat\" style=\"text-align:center;\">
<a href=\"".$_SERVER['PHP_SELF']."?accion=view&el_id=".$registro['id']."\" title=\"Mostrar detalles\"><img src=\"images/b_elegir.jpg\" alt=\"Mostrar detalles\" width=\"65\" height=\"20\" border=\"0\" align=\"middle\"></a></td>
</tr>";
} //EndWhile
echo "</tbody>
</table>";
echo "<div class=\"txtlista\">Existen $n_registros registros</div><br />";
} //EndIf
mysql_free_result($listar);
echo "</center>";
} //EndFunction
el caso es que parece que esta todo bien o eso creo pero no me imprime el valor de la variable en furgonetas.php alguein tendria la bondad de echarme una mano
mil gracias a todos