Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/11/2013, 11:49
Avatar de bryanzark01
bryanzark01
 
Fecha de Ingreso: octubre-2013
Mensajes: 31
Antigüedad: 10 años, 6 meses
Puntos: 1
Exclamación Porque mi textarea no me muestra la informacion??

estoy tratando de hacer una consulta y guardarla en un textarea en otro documento, el problema es que mi textarea no me muestra la informacion que necesito...

aqui les dejo los 2 documentos

index.php

Código PHP:

echo "<form name=formi method=post style='display:inline;' action=proceso3.php>";
echo "<button type='submit' class='stbut1 topopup' style='float:right;' name='modificar' value=" .$row['id']. "> modificar </button>";
echo "</form>";

<div id="toPopup"> 
        
        <div class="close"></div>
           <span class="ecs_tooltip">Press Esc to close <span class="arrow"></span></span>
        <div id="popup_content"> <!--your content start-->
        <h2 style="text-align: center;"> Modificar Comentario </h2>
            <table>
                <tbody>
                    <tr>
                    <td valign="middle" nowrap align="right" ><h4>Usuario:</h4>  </td>
                    <td nowrap valign="middle"><input type="text" size="50" id="se" placeholder="inserte el nombre de usuario"/></td>
                    </tr>
                    <tr>
                        <td valign="top" nowrap align="right" ><h4>comentario:</h4> </td>
                        <td nowrap valign="middle"><textarea class="estiloarea1" rows="10" cols="50" placeholder="inserte su comentario"> <?php echo $cmt?> </textarea></td>
                    </tr>
                    <br />    
                    <br />
                    <br />
                    <tr>
                        <td align="center">
                            <button type="submit" style="position:absolute; left:35%;" class="aceptar" >Aceptar</button>
                            <button type="submit" style="position:absolute; left:55%;" class="cancelar">Cancelar</button>
                        </td>
                    </tr>
                </tbody>
            
            </table>
            
        </div> <!--your content end-->
    
    </div>
y proceso3.php

Código PHP:

<?php
        
include "config.php";
        
error_reporting(0);
        
$varx=$_POST['modificar'];
        if(
$varx != "")
        {
            
$qarymysql_query("SELECT * FROM comentarios WHERE id = '".$varx."';");
            
$total=mysql_num_rows($qary);
            if(
$total 0)
            {
                while(
$resul=mysql_fetch_array($qary))
                {
                    
$cmt=nl2br($resul['comentario']);
                }
            }
            if(
$cmt == "")
            {
                
$cmt="error al rellenar variable";
            }
        }
    
    
?>