Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/12/2008, 11:57
CarolJohana
 
Fecha de Ingreso: diciembre-2008
Ubicación: Bogota
Mensajes: 149
Antigüedad: 16 años, 3 meses
Puntos: 1
Pregunta actualizar datos de mysql desde php

hola chicos resulta que tengo una aplicaicon donde debo actualizar datos hahgo la consulta y genera bn elformato para modificar pero al cambiar los datos y darle modificar no me funciona
alguien podria ayudarme a solucionar mi problema
muxas ggracias
anexo el codigo
buscar.php
Cita:
</TR>

<TD align=right>Numero de Comparendo:</TD>
<TD><INPUT type="text" style="WIDTH: 170px"
maxLength=100 name="txtnum_comparendo">

<TD> <p align="center">
<input id="ingresar" type="submit" name="Ingre" value="INGRESAR" >&nbsp;
<INPUT TYPE="reset" name="cancelar" VALUE="CANCELAR"></p> </TD>

</P></DIV>
<P align=center></P></TD></TR></TBODY></TABLE></DIV>
<P>&nbsp;</P></TD></TR>
<TR>
<TD bordercolor="#FFFFFF" bgcolor="#000033" class=tdBlue>&nbsp;</TD>
<TD borderColor=#FFCC33 align=middle width=600 height=25><div align="center"><FONT
face="Verdana, Arial, Helvetica, sans-serif" size=1>Ubat&eacute;</FONT></div></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>



</BODY>
</HTML>
<TR>
<?php
$txtnum_comparendo= $_POST['txtnum_comparendo'];


//DeterminarLa Accion

if($Ingre=='INGRESAR')
{

$Conectar=mysql_connect("localhost","root","1234") ;
$bd="COMPARENDOS";
$SQL="SELECT num_comparendo FROM comparendo WHERE num_comparendo='$txtnum_comparendo' ";
$resultado=mysql_db_query($bd,$SQL);
echo ":".mysql_error();
$NRORegistro=mysql_num_rows($resultado);

if ($NRORegistro==0)
{

?>
<script>
alert('NO SE ENCUENTRA EL COMPARENDO');
window.open("comparendo.php","prueba1", "width=1100,height=690,top=0,left=0',status,toolba r =0,scrollbars,location=0");
</script>

<?
$txtnum_comparendo= "";

}
else
{
$Registro=mysql_fetch_array($resultado);


?>
<script>
alert('ESTE COMPARENDO SE ENCUENTRA REGISTRADO');
window.open("buscar_comparendo_modificar_cuotas1.p hp","prueba1", "width=1100,height=690,top=0,left=0',status,toolba r =0,scrollbars,location=0");
</script>
<?

}




}