Hello all,
I have a script that receives an id number, this is stored into a variable named $num_cta, then when they click Modify I send this script to capture errors and handle the id number.
The script goes like this:
<php code><?php
include ("conexion_bd.php");
if($modify == "Modify")
{
if(empty($num_cta))
{
echo "Error message";
exit;
}
else
{
$consulta = "select * from sistema.tab_general where num_cta = '$num_cta'";
$conectar = conexion();
if(!$resultado = mysql_query($consulta, $conectar))
{
echo "Error message";
exit;
}
else
{
if($filas = mysql_num_rows($resultado)>0)
{
while($fila = mysql_fetch_array($resultado, MYSQL_ASSOC))
{
echo"<form method=post action=modificar.php>";
echo"<table>";
echo"<tr>";
echo"<td><b>Numero de cuenta</b></td>";
echo"<td><input type=text size=20 name=num_cta value=$fila[num_cta]></td>";
echo"</tr>";
echo"<tr>";
echo"<td><b>Nombre</b></td>";
echo"<td><input type=text size=20 name=nombre value=$fila[nombre]></td>";
echo"</tr>";
echo"<tr>";
echo"<td><b>Apellido Paterno</b></td>";
echo"<td><input type=text size=20 name=paterno value=$fila[paterno]></td>";
echo"</tr>";
echo"<tr>";
echo"<td><b>Apellido Materno</b></td>";
echo"<td><input type=text size=20 name=materno value=$fila[materno]></td>";
echo"</tr>";
echo"<tr>";
echo"<td><b>Direccion</b></td>";
echo"<td><input type=text size=20 name=direccion value=$fila[direccion]></td>";
echo"</tr>";
echo"<tr>";
echo"<td><b>Telefono</b></td>";
echo"<td><input type=text size=20 name=telefono value=$fila[telefono]></td>";
echo"</tr>";
echo"</table>";
echo"<br>";
echo"<input type=submit name=cambiar value=cambiar>";
echo"</form>";
echo"</body>";
echo"";
}
// End while procesar resultados
} // End if autentificacion
else
{
echo "Error message";
exit;
}
} // End else
} // End else
} // End If Enviar
?></php>
But I can“t see any result. I need to show the results in order to update any change made (I send the changes to modificar.php)
Thanks anyway.