php-windows Digest 10 May 2002 21:53:10 -0000 Issue 1138
Topics (messages 13680 through 13695):
using com and message queues
13680 by: frank dege
Re: XML parsing
13681 by: toby z
13682 by: Ross Fleming
13683 by: Aziz Durmaz
13684 by: Waldemar Brand Neto
13690 by: Carl Lerche
13692 by: Scott Carr
Re: register_globals and php 4.2
13685 by: Afan Pasalic
13686 by: Afan Pasalic
Re: making alarm clock
13687 by: Tomator
UPDATE not working???
13688 by: James Mansfield
13689 by: Olivier Hubert
DOMXML documentation and version questions
13691 by: Phillip Fox
Printer Functions
13693 by: Maurice Kevenaar
13694 by: Maurice Kevenaar
mail() problem
13695 by: Tomator
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
i try to create a com-object in order to use microsoft messages-queues
(MSMQ):
<?
$msmq = new COM("MSMQ.MSMQMessage") or die ("error: MSMQ.MSMQMessage");
$msmq->PathName (".\\PRIVATE$\\SYNCHMQ");
?>
unfortunatly this example cause a error-message: "Warning: Unable to lookup
pathname". the php version is 4.2.0.
has anyone tried to use microsoft message-queues under php?
frank
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
well .... im new vid da thing but the first line i
read bout xml waz dat its pretty strick bout its tags
.... if u start one .... u HAVE 2 end it .....
i dont think u can get away otherwize .....
http://www.wrox.com
they have good books ....
sorry cant hlp beyond this ..... :$ ....
toby .....
--- Carl Lerche <[EMAIL PROTECTED]> wrote: >
Hello,
>
> I have a question regarding XML parsing. Ok, I have
> an XML file that I'm
> using to contain the data for an article. Within it,
> I have an <html>
> </html> tag, where everything within those tags are
> just going to be
> html.
>
> However!! If I don't close a tag within there, let's
> say <p> the parser
> is going to give me an error. Is there anyway I can
> stop this? I just
> want everything within the <html> </html> not to be
> mucked with... like
> any text within a tag? Well... I want it to work...
> how do I do it?
>
> Thanks,
> -cARL
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Toby is right, XML is very very strict, unlike HTML browsers, which have
come to accept sloppy code. However...
W3C's Tidy program. It can clean up HTML and I believe XML. It's a command
line prog so should be fairly easy to run from PHP and simply return the
output of that program. It's worth a go.
http://www.w3.org/People/Raggett/tidy/
Ross
-----Original Message-----
From: Carl Lerche [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2002 05:23
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] XML parsing
Hello,
I have a question regarding XML parsing. Ok, I have an XML file that I'm
using to contain the data for an article. Within it, I have an <html>
</html> tag, where everything within those tags are just going to be
html.
However!! If I don't close a tag within there, let's say <p> the parser
is going to give me an error. Is there anyway I can stop this? I just
want everything within the <html> </html> not to be mucked with... like
any text within a tag? Well... I want it to work... how do I do it?
Thanks,
-cARL
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I have a problem with inserting image into the mysql database (Blob field)
with php codes...
How can i insert a image into the mysql DB with php codes...
I find some codes but they are not work....
Sample code to upload .......
<?php
if (isset ($actionflag) && $actionflag=="upload"){
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
$contents = addslashes($contents);
$conex = mysql_connect ("localhost", "root", "metaz");
mysql_select_db("usarice", $conex);
$sSql = "insert into upload (resim) values ('" . $contents . "')";
$result = mysql_query($sSql, $conex);}
?>
<html>
<body>
<title>Upload</title>
<form action="<?php print $php_SELF; ?>" enctype="multipart/form-data">
<input type="file" name="filename">
<input type="hidden" name="actionflag" value="upload">
<br>
<input type="submit">
</form>
</body>
</html>
Sample code to show
<?
header ("Content-type: image/gif");
$conex = mysql_connect ("localhost", "root", "metaz");
mysql_select_db("usarice", $conex);
$sSql = "SELECT resim FROM upload";
$result = mysql_query($sSql, $conex);
$row = mysql_fetch_array($resultado, MYSQL_ASSOC);
ob_start();
echo $row[resim];
ob_end_flush();
?>
thanks...
Aziz Durmaz
--- End Message ---
--- Begin Message ---
Dear Aziz I sufferd a lot do that to. I send a code that work for me. But I
think that have a better way to do that.
Regards,
Waldemar
Grupo3.php show the picture and can send another to update a blob field in
Grupo4.php.
----- Original Message -----
From: "Aziz Durmaz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 10, 2002 7:51 AM
Subject: RE: [PHP-WIN] XML parsing
> Hi,
>
> I have a problem with inserting image into the mysql database (Blob field)
> with php codes...
>
> How can i insert a image into the mysql DB with php codes...
> I find some codes but they are not work....
>
> Sample code to upload .......
> <?php
> if (isset ($actionflag) && $actionflag=="upload"){
> $fd = fopen ($filename, "r");
> $contents = fread ($fd, filesize ($filename));
> fclose ($fd);
> $contents = addslashes($contents);
> $conex = mysql_connect ("localhost", "root", "metaz");
> mysql_select_db("usarice", $conex);
> $sSql = "insert into upload (resim) values ('" . $contents . "')";
> $result = mysql_query($sSql, $conex);}
> ?>
> <html>
> <body>
> <title>Upload</title>
> <form action="<?php print $php_SELF; ?>" enctype="multipart/form-data">
> <input type="file" name="filename">
> <input type="hidden" name="actionflag" value="upload">
> <br>
> <input type="submit">
> </form>
> </body>
> </html>
>
> Sample code to show
> <?
> header ("Content-type: image/gif");
> $conex = mysql_connect ("localhost", "root", "metaz");
> mysql_select_db("usarice", $conex);
> $sSql = "SELECT resim FROM upload";
> $result = mysql_query($sSql, $conex);
> $row = mysql_fetch_array($resultado, MYSQL_ASSOC);
> ob_start();
> echo $row[resim];
> ob_end_flush();
>
>
> ?>
>
> thanks...
> Aziz Durmaz
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Well,
I was wondering if there was a way to have the parser consider
everything in between 2 certain tags as normal text and not as tags,
even if it's in the form <something>
Is there a way to do that?
-cARL
-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 3:41 AM
To: Carl Lerche; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] XML parsing
Toby is right, XML is very very strict, unlike HTML browsers, which have
come to accept sloppy code. However...
W3C's Tidy program. It can clean up HTML and I believe XML. It's a
command
line prog so should be fairly easy to run from PHP and simply return the
output of that program. It's worth a go.
http://www.w3.org/People/Raggett/tidy/
Ross
-----Original Message-----
From: Carl Lerche [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2002 05:23
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] XML parsing
Hello,
I have a question regarding XML parsing. Ok, I have an XML file that I'm
using to contain the data for an article. Within it, I have an <html>
</html> tag, where everything within those tags are just going to be
html.
However!! If I don't close a tag within there, let's say <p> the parser
is going to give me an error. Is there anyway I can stop this? I just
want everything within the <html> </html> not to be mucked with... like
any text within a tag? Well... I want it to work... how do I do it?
Thanks,
-cARL
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Use the "<![CDATA[" tag. Anything between this tag and the "]]>" ending will
not be parsed at all.
Reference from:
http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect
--
Scott Carr
OpenOffice.org
Whiteboard-Doc Maintainer
http://whiteboard.openoffice.org/doc/
Quoting Carl Lerche <[EMAIL PROTECTED]>:
> Well,
>
> I was wondering if there was a way to have the parser consider
> everything in between 2 certain tags as normal text and not as tags,
> even if it's in the form <something>
>
> Is there a way to do that?
> -cARL
>
> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 10, 2002 3:41 AM
> To: Carl Lerche; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] XML parsing
>
> Toby is right, XML is very very strict, unlike HTML browsers, which have
> come to accept sloppy code. However...
>
> W3C's Tidy program. It can clean up HTML and I believe XML. It's a
> command
> line prog so should be fairly easy to run from PHP and simply return the
> output of that program. It's worth a go.
>
> http://www.w3.org/People/Raggett/tidy/
>
> Ross
>
> -----Original Message-----
> From: Carl Lerche [mailto:[EMAIL PROTECTED]]
> Sent: 10 May 2002 05:23
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] XML parsing
>
>
> Hello,
>
> I have a question regarding XML parsing. Ok, I have an XML file that I'm
> using to contain the data for an article. Within it, I have an <html>
> </html> tag, where everything within those tags are just going to be
> html.
>
> However!! If I don't close a tag within there, let's say <p> the parser
> is going to give me an error. Is there anyway I can stop this? I just
> want everything within the <html> </html> not to be mucked with... like
> any text within a tag? Well... I want it to work... how do I do it?
>
> Thanks,
> -cARL
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
----- End forwarded message -----
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
My php.ini file is set as:
error_reporting = E_ALL
without E_NOTICE...
Could be a harm if I use just E_ERRORS ?
Afan
----- Original Message -----
From: Shrock, Court
To: Shrock, Court ; Afan Pasalic ; [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 7:53 PM
Subject: RE: [PHP-WIN] register_globals and php 4.2
Oops.....replace the "ALL" with "E_ALL" and "NOTICE" with "E_NOTICE"
> -----Original Message-----
> From: Shrock, Court [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 09, 2002 4:51 PM
> To: Afan Pasalic; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] register_globals and php 4.2
>
>
> You will get that error because you did not reach the page via the url
> "index.php?var_name=tada", therefore, "var_name" is not
> defined in the _GET
> superglobal array so you get a warning because of your error_reporting
> setting. The warning that was printed is actually a notice configured
> within your php.ini-- error_reporting = ALL & ~NOTICE -- is
> what it should
> be.
>
> > -----Original Message-----
> > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 09, 2002 4:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: Fw: [PHP-WIN] register_globals and php 4.2
> >
> >
> > I have the same problem but putting $var_name =
> > $_GET['var_name'] didn't solve the problem. I put it on the
> > top of the page (e.g. line no. 2) and I'm getting error:
> > PHP Warning: Undefined index: var_name in
> > F:\bhdanas.com\index.php on line 2
> >
> > Any idea?
> >
> >
> > Afan
> >
> >
> > ----- Original Message -----
> > From: Shrock, Court
> > To: brother ; '[EMAIL PROTECTED]'
> > Sent: Thursday, May 09, 2002 1:07 PM
> > Subject: RE: [PHP-WIN] register_globals and php 4.2
> >
> >
> > Replace all references of "$pagetype" with
> > "$_GET['pagetype']" (without the
> > doube-quotes, of course) or have the line "$pagetype =
> > $_GET['pagetype']" at
> > the beginning of your file. Repeat this same idea with your
> > other variables
> > and you should be okay.
> >
> > > -----Original Message-----
> > > From: brother [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 09, 2002 5:11 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: [PHP-WIN] register_globals and php 4.2
> > >
> > >
> > > I'm trying to rewrite my code so it will be useful under PHP 4.2.
> > > the links at my site are in this format
> > > index.php?pagetype=newsarchive&id=15&read=1 this will make
> > > php to look fpr
> > > the file /newsarchive/data.php and use the $id var to get
> > the correct
> > > newsline from the databse, however, when the register_globals
> > > is set to off
> > > I can't use this and I cann't figre out how to do it, HELP!
> > >
> > > the index.php starts with the code:
> > > if (!isset($pagetype)) {
> > > $pagetype = "news";
> > > }
> > >
> > > so all links displays the news page and that's not my goal =)
> > >
> > > /brother
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Let's start from beginning, I'm really confused now with answers:
It's about online newspaper. List all articles on first page goes ok.
But when I click on link to select one articele - it doesn't go anywhere. Nothing's
happen.
I added just line to print (check) id (articles are related by id):
echo"id: ".$_GET['id'];
correct id is written but still part:
if($id) {
//Take all content of that article
}
doesn't work. Like nothing happen.
But, when I put:
$IDX = $_GET['id'];
if($IDX) {
//
}
I'm getting warning:
PHP Warning: Undefined index: id in F:\bhdanas.com\index_ap.php on line 22 PHP
Warning: Undefined index: id in F:\bhdanas.com\index_ap.php on line 23
Afan
----- Original Message -----
From: Tommy Claasens - Q Data KZN
To: 'Afan Pasalic'
Sent: Friday, May 10, 2002 10:15 AM
Subject: RE: [PHP-WIN] register_globals and php 4.2
So you going to send me DIRECTIONS ?????
-----Original Message-----
From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
Sent: Fri, 10 May 2002 15:55
To: Shrock, Court; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] register_globals and php 4.2
My php.ini file is set as:
error_reporting = E_ALL
without E_NOTICE...
Could be a harm if I use just E_ERRORS ?
Afan
----- Original Message -----
From: Shrock, Court
To: Shrock, Court ; Afan Pasalic ; [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 7:53 PM
Subject: RE: [PHP-WIN] register_globals and php 4.2
Oops.....replace the "ALL" with "E_ALL" and "NOTICE" with "E_NOTICE"
> -----Original Message-----
> From: Shrock, Court [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 09, 2002 4:51 PM
> To: Afan Pasalic; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] register_globals and php 4.2
>
>
> You will get that error because you did not reach the page via the url
> "index.php?var_name=tada", therefore, "var_name" is not
> defined in the _GET
> superglobal array so you get a warning because of your error_reporting
> setting. The warning that was printed is actually a notice configured
> within your php.ini-- error_reporting = ALL & ~NOTICE -- is
> what it should
> be.
>
> > -----Original Message-----
> > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 09, 2002 4:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: Fw: [PHP-WIN] register_globals and php 4.2
> >
> >
> > I have the same problem but putting $var_name =
> > $_GET['var_name'] didn't solve the problem. I put it on the
> > top of the page (e.g. line no. 2) and I'm getting error:
> > PHP Warning: Undefined index: var_name in
> > F:\bhdanas.com\index.php on line 2
> >
> > Any idea?
> >
> >
> > Afan
> >
> >
> > ----- Original Message -----
> > From: Shrock, Court
> > To: brother ; '[EMAIL PROTECTED]'
> > Sent: Thursday, May 09, 2002 1:07 PM
> > Subject: RE: [PHP-WIN] register_globals and php 4.2
> >
> >
> > Replace all references of "$pagetype" with
> > "$_GET['pagetype']" (without the
> > doube-quotes, of course) or have the line "$pagetype =
> > $_GET['pagetype']" at
> > the beginning of your file. Repeat this same idea with your
> > other variables
> > and you should be okay.
> >
> > > -----Original Message-----
> > > From: brother [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 09, 2002 5:11 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: [PHP-WIN] register_globals and php 4.2
> > >
> > >
> > > I'm trying to rewrite my code so it will be useful under PHP 4.2.
> > > the links at my site are in this format
> > > index.php?pagetype=newsarchive&id=15&read=1 this will make
> > > php to look fpr
> > > the file /newsarchive/data.php and use the $id var to get
> > the correct
> > > newsline from the databse, however, when the register_globals
> > > is set to off
> > > I can't use this and I cann't figre out how to do it, HELP!
> > >
> > > the index.php starts with the code:
> > > if (!isset($pagetype)) {
> > > $pagetype = "news";
> > > }
> > >
> > > so all links displays the news page and that's not my goal =)
> > >
> > > /brother
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
> how would i make an alarm clock?? what i want it to do is at a certain
time
> forward to a page that has a flash movie on it that will wake me up
Just place in BODY section line like this:
<META HTTP-EQUIV="Refresh" CONTENT="TimeInSeconds; URL=UrlToThatFlash">
Your PHP code has to compute time reamining to the morning (in seconds)
and... it's done!
--- End Message ---
--- Begin Message ---
Beginner question this one (me being a designer and all) but it has been
doing my head in for a few hours now so I thought I would put it to the
group.
I am trying to create a very simple database to keep track of my business
expenses - and all to further learn PHP - but am stuck. The following update
doe snot work and I have no idea why. If I change it to an INSERT it works
(ie creates a new entry) but the update is working. Any ideas on where I
should be looking for the problem??
$sqlQuery = "UPDATE $db_table SET Date = '$date', Company = '$company',
Description = '$description', Amount = '$amount', PaidBy='$paidBy',
ReImburse='$reImburse', ReIMburseDate='reImburseDate', Note = '$note' WHERE
id='$id'";
Thanx in advance
James
--- End Message ---
--- Begin Message ---
Do you have any kind of warning or error message when executing the update
query?
Use mysql_error() to get an error message, if there is one. This will help
in pinpointing the exact source of the problem.
Olivier
At 17:35 2002-05-10 +0100, James Mansfield wrote:
>Beginner question this one (me being a designer and all) but it has been
>doing my head in for a few hours now so I thought I would put it to the
>group.
>
>I am trying to create a very simple database to keep track of my business
>expenses - and all to further learn PHP - but am stuck. The following update
>doe snot work and I have no idea why. If I change it to an INSERT it works
>(ie creates a new entry) but the update is working. Any ideas on where I
>should be looking for the problem??
>
> $sqlQuery = "UPDATE $db_table SET Date = '$date', Company = '$company',
>Description = '$description', Amount = '$amount', PaidBy='$paidBy',
>ReImburse='$reImburse', ReIMburseDate='reImburseDate', Note = '$note' WHERE
>id='$id'";
>
>Thanx in advance
>James
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'd like to do some experimenting with the DOMXML extension in PHP 4.2.0.
I realize that this is an experimental extension, I'd just like to get a
head start. I'm interested in creating and editing nodes and running XPATH
queries on nodes.
The documentation on the PHP website seems to be for a future version
(4.3.0) and contains functions that I am unable to use. I'm not sure if
this is because the documentation is for a future version, or if it is
because I'm using an older version of libxml.
My system's setup is: PHP 4.2.0 (Apache module - downloaded as the ZIP
from php.net), Apache 1.3.24 and Windows
2000.
I have download libxml2-2.4.20, and added the DLL to the PHP/DLL
directory. I have also added the full path to the libxml lib directory to
my system's PATH environment variable. But, when I check phpinfo() it shows
that I am using libxml Version 2.4.1
Is anybody else using these features yet?
Can anybody tell me if my system is setup properly?
Thanks in advance!
Phillip Fox
--- End Message ---
--- Begin Message ---
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.
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);
--- End Message ---
--- Begin Message ---
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"
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);
--- End Message ---
--- Begin Message ---
When I try to use mail() function I see warning "Unknown error in line...".
I'm using WinXP with PHP as Apache's module and have PHP.INI in C:\winnt,
where is the line "SMTP = my.addres". However phpinfo() ALWAYS tells that
SMTP is "localhost". I can change thist only with ini_set(), but it doesn't
fix my problem - I can't send any e-mail from my PHP!
How to do this??
--- End Message ---