Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/11/2010, 03:15
Ghosty
 
Fecha de Ingreso: junio-2008
Mensajes: 292
Antigüedad: 15 años, 11 meses
Puntos: 4
Respuesta: pasar variables de flash a php no funciona

Ya he corregido la parte flash asi

Código PHP:
function sendData(pixels:Array, h:Numberw:Number)
{
    
//Create the LoadVars object and pass data to PHP script
    
    
var output:LoadVars = new LoadVars();
    
output.img pixels.toString();
    
output.height h;
    
output.width w;
    
output.nombre nombre_txt.text ;     trace(nombre); 
    
    
//The page (and this movie itself) should be in a server to work
    
output.send("show.php","output","POST");
    
    

hago el trace y en la salida aparece el nombre...pero luego en el php no me pilla la variable, la recojo asi:

Código PHP:
    header"Content-type: image/jpeg");
    
//header ("Location: mi_imagen.jpg");
    
ImageJPEG$image"mi_camiseta.jpg" );
    
$nombre $_POST ['nombre'];
    
$prefijo substr(md5(uniqid(rand())),0,6);
    
$imageup file_get_contents("mi_camiseta.jpg");
    
file_put_contents("files_pedidos/".$nombre.$prefijo."micamiseta.jpg"$imageup);
    
imagedestroy$image ); 
yo creo que esta bien... seria esta linea de codigo

$nombre= $_POST ['nombre'];

No se he probado mil maneras y sigue saliendo undefined en $nombre..