Ver Mensaje Individual
  #8 (permalink)  
Antiguo 06/09/2017, 16:16
Avatar de saraivaruas
saraivaruas
 
Fecha de Ingreso: octubre-2010
Ubicación: Chile
Mensajes: 133
Antigüedad: 13 años, 6 meses
Puntos: 10
Respuesta: update condicionada y consulta a base de datos con cadena

Código PHP:
<?php 
 
echo "<form action='form_envio_whats.php' method=post>"
   echo 
"\n<table align=center>"
   echo 
"\n<tr><td><b>Nombre</b></td><td><b>Teléfono</b></td></tr>"

   
$i 1
   while (
$fila=mysql_fetch_array($result)){ 
   
      echo 
"\n<input type=hidden name='id_cap$i' value='" $fila["id_cap"] . "'>"
      echo 
"<tr>";
       echo 
"<td>" $fila["id_cap"] . "</td>";  
      echo 
"<td>" $fila["nombre"] . "</td>"
      
      
      if(
$fila['leido'] == 'No'){
      echo 
"<td><input type=text name='leido$i' value='" $fila["leido"] . "'></td>"
      echo 
"<td><input type=text name='phone$i' value='" $fila["phone"] . "'></td>";
      echo 
"<td>" ?><a href="whatsapp://send?text=Hola <?php echo '' $fila["nombre"].'' ?> ! <?php 
      
echo '' $mensaje .'' ?>&phone=<?php echo '' $fila["phone"] . '' ?>&abid=+<?php  echo '' $fila["phone"] .'' ;  ?>" > Enviar Whatsapp </a><?php
       
}
      echo 
"</tr>"
      
$ultimo_mostrado $fila["id_cap"];  
      } 
     
      echo 
"\n <td colspan=2 align=right><input type='submit' value='Editar todos'></td></td></tr>"
      echo 
"\n</table>"
      echo 
"\n</form>"
?>
ahi va