Hi,
I'm trying to create an mailmerge script width MySQL. i've got 2 tables (1
width the adresses and one width the letter)
In the letter table i've used an enter in the Insert form. When i use
printer_draw_text() i get the text as one line on my paper.
When i use printer_write() i get it as Normal text width at the end of the
page just an wordwarp like:
"Text Text Text Text Text Text Text Text Text Text Text Text Te
xt"
Or do i have to use the pdf functions to get it better.
I'm using PHP 4.2.0, Apache for windows and mysql 3.last (Don't know);
Part of my script:
$connection = mysql_connect($db_hostname,$db_username,$db_password);
mysql_select_db($dbname);
$sql_query = "select * from $tablename where ID=$id" ;
$query_result =mysql_query($sql_query) ;
$number_rows = mysql_num_rows($query_result) ;
$number_fields = mysql_num_fields($query_result) ;
$brief = mysql_fetch_array($query_result);
$connect = printer_open($printer);
printer_start_doc($connect, "PHP Document");
printer_start_page($connect);
$font = printer_create_font("Times New
Roman",72,48,100,false,false,false,0);
printer_select_font($connect, $font);
printer_draw_text($connect, $brief[4], 450, 1150);
printer_delete_font($font);
printer_end_page($connect);
printer_end_doc($connect);
printer_close($connect);
mysql_close($connection);
--
Maurice
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php