Hallo Onno,

am Sonntag, 12. Oktober 2003 um 20:07 hast Du Folgendes gekritzelt:

OK> Hi,

OK> is there a way to create a mail (with the mail() function) that contains 
OK>   php in the message.

OK> Like:

OK> <?php
OK> $to  = "[EMAIL PROTECTED]";
OK> $subject = "a subject";
OK> $message = ????

OK> I WANT TO PUT SOME PHP IN HERE TO CREATE A TABLE IN THE MESSAGE:

OK> $columnbooks = mysql_list_fields($dbname,tmp,$mysql_link);
OK> $sqlbooks = "select isbn,books.title, writer, publisher from tmp,books 
OK> where tmp.user=books.user";
OK> $resultbooks = mysql_db_query($dbname,$sqlbooks);
?>>
OK> <table cellpadding="2" cellspacing="2" border="1" style="text-align: 
left; width: 100%;">>
OK> <?php
OK> while   ($valuebooks = mysql_fetch_array($resultbooks))
OK> {       print "<tr bgcolor=#ccf504>";
OK>          for($i=0; $i< 4; $i++ )
OK>          {
OK>          $gebruikerbooks=$valuebooks[$i];
OK>          print "<td> $gebruikerbooks </td>";
OK>          }
OK>          print "</tr>";
OK> }
OK> mysql_free_result($resultbooks);

OK> THIS SHOULD BE THE END OF THE MESSAGE
 

OK> HERE I WILL DO THE MAILING

OK> mail($to,$subject,$message);
?>>


You should know that php runs on a server, not on the client machine. So what do you 
want to
do with php-code in a mail? You could put html (generated by php for
example), so that the mail-reader can display a table.


SvT


-- 
Who is the ennemy?

mailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to