#19379 [NEW]: When sending a form to a php script, the variables are not available

From: Date: Thu, 12 Sep 2002 19:08:57 +0000
Subject: #19379 [NEW]: When sending a form to a php script, the variables are not available
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19257@lists.php.net to get a copy of this message
From: juaconesaarias@terra.es Operating system: Windows 98 PHP version: 4.2.2 PHP Bug Type: Scripting Engine problem Bug description: When sending a form to a php script, the variables are not available When sending a form to a pphp script, the variables are not available on the script. For example: HTML FORM: <? include("libreriaphp.php"); encabezado_html("Introducir datos"); ?> <h2>Por favor, escribe tu aportación</H2> <form action="escribirbd.php" method="get"> Nombre: <input type="text" name="nombre" size=30><br> Apellido: <input type="text" name="apellido" size=30><br> Tu aportación:<br> <textarea name="texto" cols=40 rows=10></textarea><br> <input type="submit" value="Enviar contribución"> </form> <? pie_html(); ?> PHP SCRIPT CALLED BY FORM: <? include("libreriaphp.php"); conectar_bd("localhost","root","","prueba"); echo "variable f_texto: "; $texto; echo "<BR>"; echo "variable f_aut_nombre: "; $nombre; echo "<BR>"; echo "variable f_aut_apellido: "; $apellido; echo "<BR>"; if (($texto != "") && ($nombre != "") && ($apellido != "")) { $insertar_texto = "INSERT INTO aportaciones(nombre, apellido, texto) VALUES(\"$f_aut_nombre\", \"$f_aut_apellido\", \"$f_texto\")"; mysql_query($insertar_exto); echo mysql_error(); echo "Muchas gracias por tu aportación <BR>"; $introducir_aport="Introduce tu aportación"; } else { echo "ERROR: No has rellenado todos los campos. <BR>"; $introducir_aport = "Vuelve a introducir tu aportación"; } echo "<A HREF=form_entrada.php>$introducir_aport</A><BR>"; echo "<A HREF=leerbd.php>Leer aportaciones</A>" ?> In this case, the variables are not available for the PHP script, althought thay have been send by form. The result is that the script does nothing Can it be a problem in the .ini file or something like it? Thank you. :) -- Edit bug report at http://bugs.php.net/?id=19379&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19379&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19379&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19379&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19379&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19379&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19379&r=support Expected behavior: http://bugs.php.net/fix.php?id=19379&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19379&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19379&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19379&r=globals

« previous php.bugs (#19257) next »