Ver Mensaje Individual
  #8 (permalink)  
Antiguo 01/09/2012, 16:50
luisochonews
 
Fecha de Ingreso: agosto-2012
Mensajes: 77
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: imagen dentro de una variable PHP

Una observación:

Código PHP:
$(function() { //¿Porqué no le pones nombre a una función?//
        <?php 
                 
        
while($intimemysql_fetch_array($query5)) { 
                    
$n=$intime['nombre']; 
                    
$a=$intime['apellidos']; 
            
$id=$intime['id']; 
             
            
$quer=mysql_query("SELECT * FROM imagenes WHERE usuario = '$id' ORDER BY idfoto DESC"); 
            
$fetch=mysql_fetch_array($quer); 
            
$img=$fetch["rutachat"]; 
             
                    
$total=  "$n $a"
             
$total.= "<input type=image src=\$img\>";  
             
             
      
$elementos[]= '"'.$total.'"'
       

$arregloimplode(", "$elementos);//junta los valores del array en una sola cadena de texto 
        
?>     
         
        var availableTags=new Array(<?php echo $arreglo?>);//imprime el arreglo dentro de un array de javascript 
        $( "#tags" ).autocomplete({ 
            source: availableTags 
        }); 
    }); 



   <form action="recibe.php" method="post" class="style"> 
    <input id="tags" name="tags" placeholder="Buscar" class="search" /> 
    <input name="ir" type="submit" value="IR" id="ir" /> 
</form>