Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/10/2007, 07:28
carlosvelazq
 
Fecha de Ingreso: octubre-2007
Mensajes: 114
Antigüedad: 16 años, 5 meses
Puntos: 0
recoger variables de un formulario

Buenas estoy haciendo un formulario en html pero no puedo recoger las variables o no ma las enseña he indagado muchon pero no logro saber porque. a ver si me podeis hechar un cable. el formulario es algo asi como el siguiente:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<body background="fondo.png">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 46px; top: 206px;">

<form action="procesarlibro.php" method=post>
<table width="399" height="320" border=0>
<tr bgcolor=#cccccc>
<td width=150><div align="center"><font face="Arial, Helvetica, sans-serif">Libro De Visitas</font></div></td>
<td width=15>&nbsp;</td>
</tr>
<tr>
<td><font face="Arial, Helvetica, sans-serif">Nombre </font></td>
<td align=center><font face="Arial, Helvetica, sans-serif">
<input type="text" name="nombre" size=30 maxlength=30 id="pnombre">
</font></td>
</tr>
<tr>
<td><font face="Arial, Helvetica, sans-serif">Apellidos</font></td>
<td align=center><font face="Arial, Helvetica, sans-serif">
<input type="text" name="apellidos" size=30 maxlength=30 id="papellidos">
</font></td>
</tr>
<tr>
<td height="74"><font face="Arial, Helvetica, sans-serif">Texto</font></td>
<td align=center><font face="Arial, Helvetica, sans-serif">
<input type="text" name="texto" size=30 maxlength=200 id="ptexto" />
</font></td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit value="Enviar Pedido"></td>
</tr>
</table>
</form></div>
</body>
</html>



recojo las variables que estan sucedidas de una "p" como son "pnombre", "papellido"............ con el siguiente codigo php:



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>

<?

echo "$pnombre";
echo "$papellidos";
?>
</body>
</html>

pero no hay manera asi que espero que me podais ayudar porque no se que hacer un saludo y gracias