I have running php+mysql+pws on Windows 98 but i have a problem.
When I send values in a Form variables to a php script, it can´t resolv this values, which means, the variables are empty when arrive.
What can I do for resolve that problem.
I need take that values for INSERT into a table.
🙁
this is part of the script that send values*******************
<FORM METHOD=POST ACTION="procesar2.php">
<TABLE>
<TR>
<TD>Nombre:</TD>
<TD><INPUT TYPE="text" NAME="nomb" SIZE="20" MAXLENGTH="30"></TD>
</TR>
<TR>
<TD>Apellidos:</TD>
<TD><INPUT TYPE="text" NAME="apell" SIZE="20" MAXLENGTH="30"></TD>
</TR>
</TABLE>
<INPUT TYPE="submit" NAME="accion" VALUE="Grabar">
</FORM>
When send values, this, are showed in the address bar of the browser which means that this are sended but not received.
Example:
http://localhost/procesar.php?nomb=john&apell=White
nomb and apell are VARCHAR.
this is the script that receive********************
<?php
if (!($link=mysql_connect("localhost","root","2948em")))
{
echo "Error conectando a la base de datos.";
exit();
}
if (!mysql_select_db("prueba",$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
mysql_query("insert into prueba (Nombre,Apellido) values
('$nomb','$apell')",$link);
echo "EL nombre es : $nomb" . " y el apellido es : $apell";
/the output is El nombre es: y el apellido es :/
?>
my table´s name is prueba and fields are "Nombre" and "Apellido". the variables received are $nomb and $apell.
¿What happen?