Foros del Web » Programando para Internet » PHP »

AYUDA CON mail()

Estas en el tema de AYUDA CON mail() en el foro de PHP en Foros del Web. hola buenas tardes, tengo un problema con la funcion mail y espero que logren ayudarme. Estoy intentando hacer un boletin semanal para una pagina de ...
  #1 (permalink)  
Antiguo 24/08/2008, 11:28
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
AYUDA CON mail()

hola buenas tardes, tengo un problema con la funcion mail y espero que logren ayudarme.
Estoy intentando hacer un boletin semanal para una pagina de relatos para adultos que esta hecha en una version mas segura del popular php-nuke, ya q la pag la hice hace muchos años

bueno le explico, tengo una funcion que me genera un codigo html.
el codigo es el siguiente:
Código PHP:
function cuerpo($id){

$query1="SELECT * FROM nuke_users WHERE user_id = $id";
$result1 = mysql_query($query1);
$result2 = mysql_fetch_array($result1);





?>


<html> 
<head> 
   <title>Correo Masivo</title> 
</head> 
<body>
 
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table id="G-Tech_Header" width="100%" height="305" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-izq.jpg" width="27" height="305" alt=""></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="691"><table width="691" height="305" border="0" cellpadding="0" align="center" cellspacing="0">
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-top.jpg" width="691" height="100" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-mid.jpg" width="691" height="109" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-dwn.jpg" width="691" height="96" alt=""></td>
      </tr>
    </table></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-der.jpg" width="27" height="305" alt=""></td>
  </tr>
  
</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td><font color="#FFFFFF">Buenas Noches <b><?php echo $result2[username?></b>, este es el resumen de actividades de tu portal de Relatos Eroticos</font></td>
        </tr>
        <tr>
            <td><font color="#FFFFFF" size="+2">Te presentamos los ultimos 10 relatos publicados hasta el momento:</font></td>
        </tr>
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>

</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td><?php 
            $resultados
=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while (
$result=mysql_fetch_array($resultados))
      { 
            
            
un($result[sid]);
            }
            
            
?></td>
        </tr>
        
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>
 
 <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td colspan='3'>
            <img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_izquierdo.jpg' width='27' height='200' alt=''></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_centro.jpg' width='674' height='200' alt='' /></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_derecho.jpg' width='27' height='200' alt='' /></td>
  </tr>
</table>
 
</body> 
</html> 

<?php

}
el resultado de ese codigo es este http://www.porneia.com.ve/relatos/masivo.php

luego esa informacion que resulta de esa funcion, osea el html que ven en el link quiero meterlo en la funcion mail.

hice algo como esto:
Código PHP:
$destinatario "[email protected]"
$asunto "Tus relatos eroticos de la semana"
$cuerpo cuerpo(2);

$headers "MIME-Version: 1.0\r\n"
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"
$headers .= "From: Boletin www.porneia.com.ve <[email protected]>\r\n"


mail($destinatario,$asunto,$cuerpo,$headers
y no funciona.

si hago esto:

Código PHP:
mail($destinatario,$asunto,$cuerpo(2),$headers
intentando colocaf dentro de la funcion mail() la funcion que me genera el html y no funciona. incluso ni manda el correo.

espero que alguien me pueda ayudar. gracias.
  #2 (permalink)  
Antiguo 24/08/2008, 13:08
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

lo que sucede, es que estas imprimiendo el HTML .... y como usas una función, esta.... te debería devolver HTML con return, y no "imprimirla" ....

suerte!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 24/08/2008, 14:09
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

Cita:
Iniciado por pateketrueke Ver Mensaje
lo que sucede, es que estas imprimiendo el HTML .... y como usas una función, esta.... te debería devolver HTML con return, y no "imprimirla" ....

suerte!
gracias por tomarte el tiempo en responder, pero podrias ser un poco mas preciso?
yo se que esa funcion imprime un html en la pantalla... intente colocar ese html dentro de una varible y le di un return dentro de la funcion.. pero nada..
alguna ayuda porfa??
  #4 (permalink)  
Antiguo 25/08/2008, 09:08
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

alguna yuda porfa??
  #5 (permalink)  
Antiguo 25/08/2008, 09:33
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

mira, el salir del modo PHP implica que funcione como un echo.... ese es tu error....

si la función fuera de este modo, debería quedarte...

Código PHP:
function foo()
{
 return 
'<html><candy><bar>FOO</bar></candy></html>'// OK!


si lo haces saliendo del modo PHP, esta mal...
Código PHP:
<?php
function foo()
{
?>

<html><candy><bar>FOO</bar></candy></html>
<!-- esto esta mal, ya que es como si lo imprimiera -->

<?php
}
?>
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #6 (permalink)  
Antiguo 25/08/2008, 09:39
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

ok, dejame intentar.
pero como veras el html es vastante largo, tiene muchas "", asi que tendre que colocarles barras inversas a todas para que no me de error..
te comento que ya lo hice en una ocacion, colocando ese codigo dentro de una variable y retornandola y no funciono.

pero intentare de la forma que lo propones.
  #7 (permalink)  
Antiguo 25/08/2008, 09:50
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

mira, para esto existe otro tipo de sintaxis para cadenas.... HEREDOC

Código PHP:
function foo()
{
$bar = <<<CANDY

... aca va el HTML sin restricciones (con PHP)

CANDY;

return 
$bar;

Referencia:

http://www.php.net/types.string
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #8 (permalink)  
Antiguo 25/08/2008, 10:11
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

muchas gracias, no conocia el heredoc,
una pregunta.. como hago para ejecutar los php que tengo embebido dentro del html? si les dejos los tag php no los toma en cuenta y si se los quito en vz de ejecutar el php muestra el script como un texto.
las variasbles si las muestra, pero lo script de busquedas los muestra como texto
gracias
  #9 (permalink)  
Antiguo 25/08/2008, 10:18
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

dentro de la sintaxis heredoc, puedes usar variables PHP directamente...

Código PHP:
$foo = <<<BAR

<html>$array
[key]</html>

 o bien.... <B>$my_var</B>

BAR; 
osea, aquí no son necesarios los bloques <?php ?>
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #10 (permalink)  
Antiguo 25/08/2008, 10:21
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

si, eso ya lo vi.. pero cuando hago esto...

$resultados=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
while ($result=mysql_fetch_array($resultados))
{

un($result[sid]);
}

me muestra como si fuera un texto y no me ejecuta el codigo php
  #11 (permalink)  
Antiguo 25/08/2008, 10:25
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

te refieres a la función un() ¿¿que es la que devuelve el HTML+PHP???

antes de devolverla con return, intenta evaluarla así...

Código PHP:
return eval("?>$variable"); 
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #12 (permalink)  
Antiguo 25/08/2008, 10:33
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

no, un() es una funcion mia dentro del archivo.. esa funcion hace unos cuadros y mete una informacion de la base de datos...
esta en un bucle porque muestra 10 registros de la base de datos, osea repite esa funcion 10 vcs..

a lo que me refiero es a lo siguinte..
para llamar a esa funcion 10 vcs debo hacer un bucle

Código PHP:
$resultados=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while (
$result=mysql_fetch_array($resultados))
      { 
            
            
un($result[sid]);
            } 
ese bucle selecciona las id de los ultimos 10 registros de la base de datos y se lo mete a la funcion para que la funcion un() (hecha por mi) se encarge de hacer el cuadro e imprimirlo....
ahora cuando pongo el codigo que va en una celda de unas de las tablas dentro del heredoc en vez de hacer la busqueda en la base de datos... me imprime el mismo script en la pantalla...
no se si ahora me logras entender...
en vez de buscar en la base de datos... me escribe en la pantalla:
$resultados=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
while ($result=mysql_fetch_array($resultados))
{

un($result[sid]);
}



gracias
  #13 (permalink)  
Antiguo 25/08/2008, 10:35
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

la verdad no entiendo, ¿cual es el fragmento de PHP a evaluar??
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #14 (permalink)  
Antiguo 25/08/2008, 10:47
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

mira el codigo

Código PHP:
function hola($id){

$query1="SELECT * FROM nuke_users WHERE user_id = $id";
$result1 = mysql_query($query1);
$result2 = mysql_fetch_array($result1);



$cuer = <<<TEXT
<html> 
<head> 
   <title>Correo Masivo</title> 
</head> 
<body>
 
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table id="G-Tech_Header" width="100%" height="305" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-izq.jpg" width="27" height="305" alt=""></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="691"><table width="691" height="305" border="0" cellpadding="0" align="center" cellspacing="0">
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-top.jpg" width="691" height="100" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-mid.jpg" width="691" height="109" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-dwn.jpg" width="691" height="96" alt=""></td>
      </tr>
    </table></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-der.jpg" width="27" height="305" alt=""></td>
  </tr>
  
</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td><font color="#FFFFFF">Buenas Noches <b>$result2[username]</b>, este es el resumen de actividades de tu portal de Relatos Eroticos</font></td>
        </tr>
        <tr>
            <td><font color="#FFFFFF" size="+2">Te presentamos los ultimos 10 relatos publicados hasta el momento:</font></td>
        </tr>
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>

</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td>
            $resultados=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while ($result=mysql_fetch_array($resultados))
      { 
            
            un($result[sid]);
            }
            
            </td>
        </tr>
        
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>



  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>

<table>
        
        <tr>
            <td><font color="#FFFFFF" size="+2">Te presentamos las ultimas 10 imagenes publicadas por usuario a nuestra galeria:</font></td>
        </tr>
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>


  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>

            
            
            
            <table border="0" width="100%">
       <tr>
     
     $contador=1;
     $result=mysql_query("Select * from cpg_pictures ORDER BY pid DESC LIMIT 12");
         while($row = mysql_fetch_array($result)){
        
 if ($contador%4==0){
 $par = 1;
 }else{
 $par = 0;
 }
     


    <td valign="top" align="center">
        
    <table>
        <tr>
            <td><a href="http://www.porneia.com.ve/relatos/modules.php?name=coppermine" target="_blank"><img src="http://www.porneia.com.ve/relatos/$row[filepath]/thumb_$row[filename]"  border="0"></a></td>
        </tr>
        <tr>
            <td><b><font color="#993300"><?php echo "$row[title]"?></font></b></td>
        </tr>
    </table>

    
    
    
    </td>

 
 

    
    
    if ($par == 1){
    
    echo "</tr><tr>";
    }
    $contador++; 
      }
    
     </tr>
</table>

            
            
            
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>



 
 <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td colspan='3'>
            <img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_izquierdo.jpg' width='27' height='200' alt=''></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_centro.jpg' width='674' height='200' alt='' /></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_derecho.jpg' width='27' height='200' alt='' /></td>
  </tr>
</table>
 
</body> 
</html> 

TEXT;

return $cuer; 
}
mas o menos por la linea 65 hay un scirpt en php que saca 10 registros de la base de datos, se la manda a una funcion para que la funcion me cree 10 tablar y me las muestre en la pantalla.

fijate mira este link:
http://www.porneia.com.ve/relatos/masivo.php
abrelo, el fondo de la pagina es negro, por eso no veras los errores.. pero selecciona todo en la pagina para que se sombreen todos los elemntos y vea el error que me da.. o no el error, sino lo que imprime en la pantalla...
ahora mira este:
http://www.porneia.com.ve/relatos/masivo1.php
asi deberia queddar.

gracias
  #15 (permalink)  
Antiguo 25/08/2008, 10:57
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

ahora entiendo, de todos modos debes usar eval() y bloques <?php ?> para hacer esto... sino, por eso no se evalúa... (que por cierto, debes evaluar)

solo que otra cosa, no deberías evaluar dentro de la misma función a menos que esta dentro del contexto de tus variables) así entonces, debes evaluarla justo en el script donde uses la función hola()

me explico??

Código PHP:
<td><?php
            $resultados
=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while (
$result=mysql_fetch_array($resultados))
      { 
            
            
un($result[sid]);
            }
            
?>
            </td>
y si acá haces el eval('?>'.hola('foo')) debería ir, no lo se... xD

*** en realidad debería ir aquí....

Código PHP:
return eval("?>$cuer"); 
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #16 (permalink)  
Antiguo 25/08/2008, 11:18
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

la verdad.. no te entendi nada..
dejame ver que logro hacer...

gracias
  #17 (permalink)  
Antiguo 25/08/2008, 11:28
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

o mejor dicho, si yo dentro de ese heredoc quiero imprimir 500 veces la palabra "hola" y digo que se me hace mas fasil usar un bucle while que el me imprima 500 veces esa palabras... como lo deberia hacer?

gracias
  #18 (permalink)  
Antiguo 25/08/2008, 11:50
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

Código PHP:
$foo = <<<BAR

<td>

<?php
  $c
=50;
  while (--
$c)
  {
    echo 
$c.'<br />';
  }

?>

</td>

BAR;

eval("?>$foo");
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #19 (permalink)  
Antiguo 25/08/2008, 12:15
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

Muchas gracias petekuetreke me has ayudado bastante.. pero te comento que ese codigo que me enviastes esta mal.. no me funciona... ni en mi codigo.. ni copiando y pegando eso en un archivo nuevo me funciona.... no me hace el bucle..
  #20 (permalink)  
Antiguo 25/08/2008, 12:26
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: AYUDA CON mail()

tienes razón, ya que heredoc va evaluando el PHP de la cadena....

no veo que los puedas solucionar tan fácil.... porque, no solo separas el ciclo... y listo?

osea...

Código PHP:
$foo = <<<BAR

....

BAR;

$out '';
while (...)
{
  
$out .= '.....';
}


$bar = <<<CANDY

.....

CANDY;

return 
$foo.$out.$bar
o algo así, se entiende?
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #21 (permalink)  
Antiguo 25/08/2008, 12:42
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

si compa, eso ya lo habia hecho.. pero no me dio resultado.. aunque lo hare de nuevo... para ver si fue que cometi un error cuando lo hice

gracias
  #22 (permalink)  
Antiguo 25/08/2008, 13:27
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: AYUDA CON mail()

otra cosa mas

Código PHP:
$resultados=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while (
$result=mysql_fetch_array($resultados))
      { 
            
$re un($result[sid]);
            }
            

$crp $cuer.$re.$cuer1;
return 
$crp

y mira lo que ocurre:

http://www.porneia.com.ve/relatos/masivo1.php
muestr el bucle en la parte de arribe y luego muestras la pagina
:s

gracias
  #23 (permalink)  
Antiguo 25/08/2008, 15:42
(Desactivado)
 
Fecha de Ingreso: agosto-2008
Mensajes: 23
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: AYUDA CON mail()

Prueba con estos videos http://tiendaonline.100webspace.net/product_info.php?products_id=30
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:56.