Ver Mensaje Individual
  #11 (permalink)  
Antiguo 13/06/2011, 21:48
marcofbb
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: como usar array?

Código PHP:
Ver original
  1. <?php
  2. $SQL = mysql_query("SELECT * FROM  mensajes WHERE name='".$name."' AND indicador=0 ORDER BY id desc LIMIT 0, 10");
  3. while($row = mysql_fetch_array($SQL)){
  4.  
  5. $id[] = $row['id'];
  6.  
  7. ?>
  8. <form name="FORM" method="post" action="muro.php?name=<?=$name;?>">
  9. <textarea name="msg" wrap="off" style="width:480px; height: 20px;" onkeypress="iSubmitEnter(event, document.FORM);"></textarea>
  10. </span></div>

Código PHP:
Ver original
  1. foreach($id as $valor){
  2. $name=$_SESSION['nick'];
  3. $mensaje=$_POST['msg'];
  4. $insert = mysql_query("INSERT INTO mensajes(name,fecha,mensaje,indicador)
  5. values('$name',NOW(),'$mensaje','$valor')"  );
  6. echo "TODO OK";


Igual no entiendo bien lo que quered hacer explícate mejor por ahí la solución es otra