Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Php+jquery+mysql

Estas en el tema de Php+jquery+mysql en el foro de PHP en Foros del Web. tengo una consulta si alguien me puede explicar como hacerlo, es un sistema para direcciones... el código es una mezcla de php+sql+jquery Codigo de ACM ...
  #1 (permalink)  
Antiguo 22/05/2013, 21:57
 
Fecha de Ingreso: agosto-2011
Mensajes: 4
Antigüedad: 12 años, 8 meses
Puntos: 0
Php+jquery+mysql

tengo una consulta si alguien me puede explicar como hacerlo, es un sistema para direcciones...
el código es una mezcla de php+sql+jquery

Codigo de ACM

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
script type="text/javascript" src="jquery-1.9.1.js"></script>


<script>
function cargar(div, desde)
{
     $(div).load(desde);
}
</script>

<style type="text/css">
.cabecera {
    color: #FFF;
    background-color: #F60;
}
h1 {
    color: #00F;
}
.input {
    color: #FFF;
    background-color: #00F;
}
a {
    color: #00F;
    text-decoration: none;
}
</style>
</head>
<body>
<h1>ACM sistema de direcciones</h1>
<p>Estados de las direcciones.</p>
<p>
1 Ingresado <br />
2 Revision <br />
3 Intranet</p>
<p>&nbsp;</p>
<table width="600" height="46" border="0">
  <tr>
    <td width="145" class="cabecera">Consultar estado: 
<a href="#" onclick="cargar('#divtest', '1.php')">1 </a> //  
<a href="#" onclick="cargar('#divtest', '2.php')">2</a>  //  
<a href="#" onclick="cargar('#divtest', '3.php')">3</a></td>
  </tr>
</table>

<div id="divtest"> Seleccionar Estado.</div> 
Codigo de 1.php:
Código PHP:
<?php
include ('conexion.php');

$sql mysql_query("SELECT * FROM  `faltantes` WHERE  `estado` = 1"$connect);

echo
'<table width="600" height="46" border="1">
  <tr>
    <td width="145" class="cabecera">Villa</td>
    <td width="135" class="cabecera">Dirección</td>
    <td width="52" class="cabecera">Numero</td>
    <td width="90" class="cabecera">Departamento</td>
    <td width="49" class="cabecera">Estado</td>
    <td width="103" class="cabecera">Cambiar estado<form method="post" action="save1.php"></td>
  </tr>'
;
  

while(
$row mysql_fetch_assoc($sql)){

$query 'UPDATE `faltantes` SET  `estado` = '.$estado.' WHERE  `faltantes`.`id` = '.$id.';';

    echo 
'<tr>
    <td width="145">'
.$row['villa'].'</td>
    <td width="135">'
.$row['direccion'].'</td>
    <td width="52">'
.$row['numero'].'</td>
    <td width="90">'
.$row['departamento'].'</td>
    <td width="49">'
.$row['estado'].'</td>
    <td width="103"><input name="value'
.$id.'" type="text" size="10" maxlength="5" /></td></tr>';

}

    echo 
'<tr>
    <td width="145"></td>
    <td width="135"></td>
    <td width="52"></td>
    <td width="90"></td>
    <td width="49"></td>
    <td width="103"><input type="submit" value="Enviar" /></form></td></tr>'
;

echo 
'</table>';

?>
Lo que necesito es enviar los datos del formulario, con la actualización de estado.
Alguna idea
  #2 (permalink)  
Antiguo 23/05/2013, 00:25
Avatar de repara2  
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Php+jquery+mysql

Alguna idea? una vez que entiendas tu propio código postea la parte que te da problemas, siempre puedes consultar un tutorial en este mismo foro. Salu2
__________________
Fere libenter homines, id quod volunt, credunt.
  #3 (permalink)  
Antiguo 23/05/2013, 19:40
 
Fecha de Ingreso: agosto-2011
Mensajes: 4
Antigüedad: 12 años, 8 meses
Puntos: 0
Respuesta: Php+jquery+mysql

Cita:
Iniciado por repara2 Ver Mensaje
Alguna idea? una vez que entiendas tu propio código postea la parte que te da problemas, siempre puedes consultar un tutorial en este mismo foro. Salu2
Gracias, pero ya solucione el problema Saludos.

Etiquetas: formulario, html, jquery-ajax, mysql, sql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:14.