Re: [PHP-DB] PHP Warning: InterBase: I/O error for file File too large.

2003-07-24 Thread Lester Caine
I have problems with firebird database files which are  2GB.

Till today everything works good but, now one database file is  then 2 GB
and I have this error message in my log:
[23-Jul-2003 22:54:02] PHP Warning:  InterBase: I/O error for file
/web/test.gdb Error while trying to open file File too large  in
/web/test.inc on line 38
in the script on line 38 is:
ibase_pconnect(/web/test.gdb,$ibuser,$ibpassword,WIN1250,0,3)
when I use this line
ibase_pconnect(localhost:/web/test.gdb,$ibuser,$ibpassword,WIN1250,0,3)
or connect through isql in shell.
everything works good. (No error). But I want connect to my database directly
through php and libgds.so, and not via gds_inet_server on localhost.
I trie to compile php module in several ways, check the versions of libs
(libgds.so) but with no success.
Can anybody send some suggestion to me?
Not sure that I can help, but TCP/IP access to Firebird is 
by far the bast way to go anyway.

This is probably a hangover from the fact that the php 
module is quite old, and the best place to discuss it is on 
the Firebird-php list on yahoo. We do have ONE person who 
has been fixing bugs in the php module ;)

http://groups.yahoo.com/group/firebird-php?yguid=70215863

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] dynamic radio buttons.. checked or not?

2003-07-24 Thread Aaron Wolski
Hi Guys.. hopefully someone can help with this.
 
Code:
 
$query = select t.id, t.thread_index, t.pattern_index,
t.avail, p.id, p.type, p.colour, p.colourID, p.manufacturer FROM
kcs_patternthreads t LEFT JOIN kcs_threads p ON t.thread_index = p.id
WHERE t.pattern_index = $id;
 
$thread_manufacturer = '';
 
$result = db_query($query);
while($thread = db_fetch($result)) {
 
if($thread_manufacturer !=
$thread['manufacturer']) {
 
echo tr
valign=\top\\n;
echo   td
colspan=\2\font class=\adminHeader\Threads:/font font
class=\adminSelectBox\{$thread['manufacturer']}/font/td\n;
echo /tr\n;
$thread_manufacturer =
$thread['manufacturer'];
 
}
 
$thread_colourID =
str_pad($thread['colourID'], 8,  , STR_PAD_RIGHT);
$thread_type = str_pad($thread['type'],
20,  , STR_PAD_RIGHT);
$thread_colour =
str_pad($thread['colour'], 20,  , STR_PAD_RIGHT);

$thread_colourID = str_replace(
,nbsp;, $thread_colourID);
$thread_type = str_replace( ,nbsp;,
$thread_type);
$thread_colour = str_replace(
,nbsp;, $thread_colour);
 
echo tr valign=\middle\\n;
 
echo   td
colspan=\2\ style=\font-family:monospace;color: #696565;font-size:
9pt;\{$thread_colourID}{$thread_type}{$thread_colour}Available to
Order: nbsp;Yesinput type=\radio\ name=\avail\ value=\1\;
 
if ($thread[avail] == 1) echo 
checked; //is this record available?
 
echo
nbsp;nbsp;nbsp;Noinput type=\radio\ name=\avail\ value=\0\;
 
if ($thread[avail] == 0) echo 
checked; //is this record not available?
 
echo /td\n;
 
echo/tr\n;
}
 
END CODE
 
Everything on this script works except the radio button checked part. 
 
What's supposed to happen is if $thread[avail] == 1 then display the YES
radio as checked for that record and if $thread[avail] == 0 then
display the NO radio as checked for that record.
 
I did an echo on $thread[avail] and I get the correct values:
 
0
1
0
 
 
Does anyone have a clue as to my problem here?
 
Thanks in advance!
 
Aaron
 


Re: [PHP-DB] change datatype in postgres

2003-07-24 Thread Norma Ramirez - TECNOSOFT
Thank´s Xaos, help´s a lot. =
Regards, Norma R


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



[PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread J. Michael Roberts
I've been going a little crazy here with a single line of code that 
should work, but doesn't. It's probably has something to do with the 
fact that I've been staring at pages of code for months on end.

In order to make user that nobody is screwing with the database while 
the daily backups and maintainence are running, I decided to make a 
little thing that would keep people from logging in, etc. Here's the line:

if (strftime(%H) == 03) { header( Location: maintainence.php ); }

In theory, if it's any time between 03:00:00 and 03:59:59 the user 
should be redirected to the page maintainence.php, but when testing it 
passes over this line without a blip. Any ideas?

Feeling fried,
--JMR




RE: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread Aaron Wolski
if (strftime(%H) == 03)
{
header( Location: maintainence.php );
exit;
}

Note the exit; line.

Aaron

-Original Message-
From: J. Michael Roberts [mailto:[EMAIL PROTECTED] 
Sent: July 24, 2003 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Line of code should work...but doesn't

I've been going a little crazy here with a single line of code that 
should work, but doesn't. It's probably has something to do with the 
fact that I've been staring at pages of code for months on end.

In order to make user that nobody is screwing with the database while 
the daily backups and maintainence are running, I decided to make a 
little thing that would keep people from logging in, etc. Here's the
line:

if (strftime(%H) == 03) { header( Location: maintainence.php ); }

In theory, if it's any time between 03:00:00 and 03:59:59 the user 
should be redirected to the page maintainence.php, but when testing it 
passes over this line without a blip. Any ideas?

Feeling fried,
--JMR





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



[PHP-DB] Re: dynamic radio buttons.. checked or not?

2003-07-24 Thread Stf
Hi,

perhaps it is a stupid question, but have you put a space caractere before
checked ?
Did you type :
if ($thread[avail] == 0) echo  checked; //is this record not available?
or
if ($thread[avail] == 0) echo checked; //is this record not available?

Other question :
Is avail a constant ?
If not, but it between quotes.

Stf




Aaron Wolski [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 Hi Guys.. hopefully someone can help with this.

 Code:

 $query = select t.id, t.thread_index, t.pattern_index,
 t.avail, p.id, p.type, p.colour, p.colourID, p.manufacturer FROM
 kcs_patternthreads t LEFT JOIN kcs_threads p ON t.thread_index = p.id
 WHERE t.pattern_index = $id;

 $thread_manufacturer = '';

 $result = db_query($query);
 while($thread = db_fetch($result)) {

 if($thread_manufacturer !=
 $thread['manufacturer']) {

 echo tr
 valign=\top\\n;
 echo   td
 colspan=\2\font class=\adminHeader\Threads:/font font
 class=\adminSelectBox\{$thread['manufacturer']}/font/td\n;
 echo /tr\n;
 $thread_manufacturer =
 $thread['manufacturer'];

 }

 $thread_colourID =
 str_pad($thread['colourID'], 8,  , STR_PAD_RIGHT);
 $thread_type = str_pad($thread['type'],
 20,  , STR_PAD_RIGHT);
 $thread_colour =
 str_pad($thread['colour'], 20,  , STR_PAD_RIGHT);

 $thread_colourID = str_replace(
 ,nbsp;, $thread_colourID);
 $thread_type = str_replace( ,nbsp;,
 $thread_type);
 $thread_colour = str_replace(
 ,nbsp;, $thread_colour);

 echo tr valign=\middle\\n;

 echo   td
 colspan=\2\ style=\font-family:monospace;color: #696565;font-size:
 9pt;\{$thread_colourID}{$thread_type}{$thread_colour}Available to
 Order: nbsp;Yesinput type=\radio\ name=\avail\ value=\1\;

 if ($thread[avail] == 1) echo 
 checked; //is this record available?

 echo
 nbsp;nbsp;nbsp;Noinput type=\radio\ name=\avail\ value=\0\;

 if ($thread[avail] == 0) echo 
 checked; //is this record not available?

 echo /td\n;

 echo/tr\n;
 }

 END CODE

 Everything on this script works except the radio button checked part.

 What's supposed to happen is if $thread[avail] == 1 then display the YES
 radio as checked for that record and if $thread[avail] == 0 then
 display the NO radio as checked for that record.

 I did an echo on $thread[avail] and I get the correct values:

 0
 1
 0


 Does anyone have a clue as to my problem here?

 Thanks in advance!

 Aaron





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



RE: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread jeffrey_n_Dyke

this may work, but i hesitate, i've _never_ had to use exit to get my code
to excecute a redirect.  and i'm heavily reliant on this function.

did aarons fix work for you?  i think you're problem lies elsewhere.  as
i've just mocked the same thing on my server, but using 10 instead of
03...i'm on EST and its excecutes perfectly.

don't mean to cause waves...just curious.
Jeff




   
 
  Aaron Wolski   
 
  [EMAIL PROTECTED]To:   'J. Michael Roberts' 
[EMAIL PROTECTED], [EMAIL PROTECTED]
  z.com   cc: 
 
   Subject:  RE: [PHP-DB] Line of code 
should work...but doesn't
  07/24/2003 10:12 
 
  AM   
 
   
 
   
 




if (strftime(%H) == 03)
{
 header( Location: maintainence.php );
 exit;
}

Note the exit; line.

Aaron

-Original Message-
From: J. Michael Roberts [mailto:[EMAIL PROTECTED]
Sent: July 24, 2003 10:09 AM
  To: [EMAIL PROTECTED]
Subject: [PHP-DB] Line of code should work...but doesn't

I've been going a little crazy here with a single line of code that
should work, but doesn't. It's probably has something to do with the
fact that I've been staring at pages of code for months on end.

In order to make user that nobody is screwing with the database while
the daily backups and maintainence are running, I decided to make a
little thing that would keep people from logging in, etc. Here's the
line:

if (strftime(%H) == 03) { header( Location: maintainence.php ); }

In theory, if it's any time between 03:00:00 and 03:59:59 the user
should be redirected to the page maintainence.php, but when testing it
passes over this line without a blip. Any ideas?

Feeling fried,
--JMR





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






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



Re: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread J. Michael Roberts
Very interesting...and extremely helpful.

It's amazing the major difference a little 'exit;' can make.

Many thanks for saving my sanity,

--JMR

Aaron Wolski wrote:

if (strftime(%H) == 03)
{
   header( Location: maintainence.php );
   exit;
}

Note the exit; line.

Aaron

-Original Message-
From: J. Michael Roberts [mailto:[EMAIL PROTECTED] 
Sent: July 24, 2003 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Line of code should work...but doesn't

I've been going a little crazy here with a single line of code that 
should work, but doesn't. It's probably has something to do with the 
fact that I've been staring at pages of code for months on end.

In order to make user that nobody is screwing with the database while 
the daily backups and maintainence are running, I decided to make a 
little thing that would keep people from logging in, etc. Here's the
line:

if (strftime(%H) == 03) { header( Location: maintainence.php ); }

In theory, if it's any time between 03:00:00 and 03:59:59 the user 
should be redirected to the page maintainence.php, but when testing it 
passes over this line without a blip. Any ideas?

Feeling fried,
--JMR





  


-- 
J-Michael Roberts
Highland Associates
228 East 45th Street
New York, NY  10017
212-681-0200 - phone
212-681-0201 - fax
[EMAIL PROTECTED]
http://www.HighlandAssociates.com





RE: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread Hutchins, Richard
Aside from seeing that you've already solved this one, I'll also apologize
for obviously being wrong AND for the typo in the URI (should've been
www.yoursite.com/yourdir/maintenance.php).

Is it Friday yet? :)

 -Original Message-
 From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 10:34 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Line of code should work...but doesn't
 
 
 I'll admit right up front that this is an educated guess, but 
 I think you
 need to provide an absolute path for the location. 
 
 header(Location: http://yoursite/yourdir/maintenance.php;);
 
 Quoted from the online docs:
 Note: HTTP/1.1 requires an absolute URI as argument to 
 Location: including
 the scheme, hostname and absolute path, but some clients 
 accept relative
 URIs. You can usually use $_SERVER['HTTP_HOST'], 
 $_SERVER['PHP_SELF'] and
 dirname() to make an absolute URI from a relative one yourself.
 
 I use header() for redirects all the time as well and have 
 always made a
 habit of using a fully qualified URI just because the docs 
 said so. Never
 tried any other way so I've never had any problems with it.
 
 Hope this helps.
 
 Rich
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 24, 2003 10:29 AM
  To: Aaron Wolski
  Cc: 'J. Michael Roberts'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Line of code should work...but doesn't
  
  
  
  this may work, but i hesitate, i've _never_ had to use exit 
  to get my code
  to excecute a redirect.  and i'm heavily reliant on this function.
  
  did aarons fix work for you?  i think you're problem lies 
  elsewhere.  as
  i've just mocked the same thing on my server, but using 10 
 instead of
  03...i'm on EST and its excecutes perfectly.
  
  don't mean to cause waves...just curious.
  Jeff
  
  
  
  


  
Aaron Wolski  

  
[EMAIL PROTECTED]To:   'J. 
  Michael Roberts' [EMAIL PROTECTED], 
  [EMAIL PROTECTED]
z.com   cc:

  
 Subject:  RE: 
  [PHP-DB] Line of code should work...but doesn't   
   
07/24/2003 10:12

  
AM  

  


  


  
  
  
  
  
  if (strftime(%H) == 03)
  {
   header( Location: maintainence.php );
   exit;
  }
  
  Note the exit; line.
  
  Aaron
  
  -Original Message-
  From: J. Michael Roberts [mailto:[EMAIL PROTECTED]
  Sent: July 24, 2003 10:09 AM
To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Line of code should work...but doesn't
  
  I've been going a little crazy here with a single line of code that
  should work, but doesn't. It's probably has something to do with the
  fact that I've been staring at pages of code for months on end.
  
  In order to make user that nobody is screwing with the 
 database while
  the daily backups and maintainence are running, I decided to make a
  little thing that would keep people from logging in, etc. Here's the
  line:
  
  if (strftime(%H) == 03) { header( Location: 
  maintainence.php ); }
  
  In theory, if it's any time between 03:00:00 and 03:59:59 the user
  should be redirected to the page maintainence.php, but when 
 testing it
  passes over this line without a blip. Any ideas?
  
  Feeling fried,
  --JMR
  
  
  
  
  
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  
  
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



RE: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread Aaron Wolski
Hmm.. interesting.

I never use a full URI unless I am directing to a secure server and
things always work on my end.

Works either way I guess?

Aaron

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED] 
Sent: July 24, 2003 10:34 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Line of code should work...but doesn't

I'll admit right up front that this is an educated guess, but I think
you
need to provide an absolute path for the location. 

header(Location: http://yoursite/yourdir/maintenance.php;);

Quoted from the online docs:
Note: HTTP/1.1 requires an absolute URI as argument to Location:
including
the scheme, hostname and absolute path, but some clients accept relative
URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF']
and
dirname() to make an absolute URI from a relative one yourself.

I use header() for redirects all the time as well and have always made a
habit of using a fully qualified URI just because the docs said so.
Never
tried any other way so I've never had any problems with it.

Hope this helps.

Rich

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 10:29 AM
 To: Aaron Wolski
 Cc: 'J. Michael Roberts'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Line of code should work...but doesn't
 
 
 
 this may work, but i hesitate, i've _never_ had to use exit 
 to get my code
 to excecute a redirect.  and i'm heavily reliant on this function.
 
 did aarons fix work for you?  i think you're problem lies 
 elsewhere.  as
 i've just mocked the same thing on my server, but using 10 instead of
 03...i'm on EST and its excecutes perfectly.
 
 don't mean to cause waves...just curious.
 Jeff
 
 
 
 
   
   
 
   Aaron Wolski  
   
 
   [EMAIL PROTECTED]To:   'J. 
 Michael Roberts' [EMAIL PROTECTED], 
 [EMAIL PROTECTED]
   z.com   cc:
   
 
Subject:  RE: 
 [PHP-DB] Line of code should work...but doesn't   
  
   07/24/2003 10:12
   
 
   AM  
   
 
   
   
 
   
   
 
 
 
 
 
 if (strftime(%H) == 03)
 {
  header( Location: maintainence.php );
  exit;
 }
 
 Note the exit; line.
 
 Aaron
 
 -Original Message-
 From: J. Michael Roberts [mailto:[EMAIL PROTECTED]
 Sent: July 24, 2003 10:09 AM
   To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Line of code should work...but doesn't
 
 I've been going a little crazy here with a single line of code that
 should work, but doesn't. It's probably has something to do with the
 fact that I've been staring at pages of code for months on end.
 
 In order to make user that nobody is screwing with the database while
 the daily backups and maintainence are running, I decided to make a
 little thing that would keep people from logging in, etc. Here's the
 line:
 
 if (strftime(%H) == 03) { header( Location: 
 maintainence.php ); }
 
 In theory, if it's any time between 03:00:00 and 03:59:59 the user
 should be redirected to the page maintainence.php, but when testing it
 passes over this line without a blip. Any ideas?
 
 Feeling fried,
 --JMR
 
 
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




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



Re: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread CPT John W. Holmes
 I never use a full URI unless I am directing to a secure server and
 things always work on my end.
 
 Works either way I guess?

There's a big difference between works and the right way to do it...

---John Holmes...

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



Re: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread John W. Holmes
[EMAIL PROTECTED] wrote:

this may work, but i hesitate, i've _never_ had to use exit to get my code
to excecute a redirect.  and i'm heavily reliant on this function.
I say again: There is a big difference between works and the right 
way to do it. Think about it logically... if you are going to redirect 
to another page, there is absolutely no reason for another single line 
of PHP code to be run from the current script... so exit()!

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





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


Re: [PHP-DB] Line of code should work...but doesn't

2003-07-24 Thread jeffrey_n_Dyke

that why i love this list.

thanks


   
 
  John W. Holmes 
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  rter.netcc:   Aaron Wolski [EMAIL 
PROTECTED], 'J. Michael Roberts'   
[EMAIL PROTECTED], [EMAIL PROTECTED] 
 
  07/24/2003 12:24 Subject:  Re: [PHP-DB] Line of code 
should work...but doesn't
  PM   
 
  Please respond to
 
  holmes072000 
 
   
 
   
 




[EMAIL PROTECTED] wrote:

 this may work, but i hesitate, i've _never_ had to use exit to get my
code
 to excecute a redirect.  and i'm heavily reliant on this function.

I say again: There is a big difference between works and the right
way to do it. Think about it logically... if you are going to redirect
to another page, there is absolutely no reason for another single line
of PHP code to be run from the current script... so exit()!

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals ? www.phparch.com









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



[PHP-DB] Email with attachments

2003-07-24 Thread Diana Cassady
Hi. I'm trying to send email with attachments using PHP and have just 
about got it based on the example provided by alex at bartl dot net 
on http://us4.php.net/manual/en/ref.mail.php.

The only difficulty I'm having is that the attachment is coming through 
as part of the message. The message says there is an attachment, but it 
doesn't give me an icon with the name. I just get the text/html part of 
the message and then the binary data that makes up the attachment.

I'm thinking it has something to do with the boundaries. I've read 
everyone's example on that page and followed the links to the 1993 MIME 
specs on the Mindspring site but am still getting nowhere. Has anyone 
else ever had this problem? If so, how did you solve it?

Its for a good cause - to allow users to upload resumes to a company. 
There will be no spam going on with the use of this code.

Thanks for your time and consideration.

Diana   
[EMAIL PROTECTED] Will Work for Chocolate
http://www.vivaladata.com   (and its worth every byte!)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Email with attachments

2003-07-24 Thread Danbru
Hello!!

Use this function...

function sendmsg($to, $subject, $text, $cc, $from, $file, $type) {
$content = fread(fopen($file,r),filesize($file));
$content = chunk_split(base64_encode($content));
$uid = strtoupper(md5(uniqid(time(;
$name = basename($file);
$text = stripslashes($text);
$subject = stripslashes($subject);
$header = From: $from\nReply-To: $from\n;
$header .= Cc: $cc\n;
$header .= MIME-Version: 1.0\n;
$header .= Content-Type: multipart/mixed; boundary=$uid\n;
$header .= --$uid\n;
$header .= Content-Type: text/plain\n;
$header .= Content-Transfer-Encoding: 8bnoit\n\n;
$header .= $text\n;
$header .= \n;
$header .= \n;
$header .= --$uid\n;
$header .= Content-Type: $type; name=\$name\\n;
$header .= Content-Transfer-Encoding: base64\n;
$header .= Content-Disposition: attachment; filename=\$name\\n\n;
$header .= $content\n;
	$header .= --$uid--;

	mail($to, $subject, , $header);

return true;
}
The call it like this...



sendmsg($to, $subject, $text, $cc, $from, $file, $type);



I didn't write this, forgot who did,  I just tweaked it for my tastes 
(not shown)...



Dan



On Thursday, July 24, 2003, at 3:00 PM, [EMAIL PROTECTED] wrote:

Hi. I'm trying to send email with attachments using PHP and have just 
about got it based on the example provided by alex at bartl dot net 
on http://us4.php.net/manual/en/ref.mail.php.

The only difficulty I'm having is that the attachment is coming 
through as part of the message. The message says there is an 
attachment, but it doesn't give me an icon with the name. I just get 
the text/html part of the message and then the binary data that makes 
up the attachment.

I'm thinking it has something to do with the boundaries. I've read 
everyone's example on that page and followed the links to the 1993 
MIME specs on the Mindspring site but am still getting nowhere. Has 
anyone else ever had this problem? If so, how did you solve it?

Its for a good cause - to allow users to upload resumes to a company. 
There will be no spam going on with the use of this code.

Thanks for your time and consideration.

Diana   
[EMAIL PROTECTED] Will Work for Chocolate
http://www.vivaladata.com   (and its worth every byte!)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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


[PHP-DB] Re: Email with attachments

2003-07-24 Thread Manuel Lemos
Hello,

On 07/24/2003 05:00 PM, Diana Cassady wrote:
Hi. I'm trying to send email with attachments using PHP and have just 
about got it based on the example provided by alex at bartl dot net on 
http://us4.php.net/manual/en/ref.mail.php.

The only difficulty I'm having is that the attachment is coming through 
as part of the message. The message says there is an attachment, but it 
doesn't give me an icon with the name. I just get the text/html part of 
the message and then the binary data that makes up the attachment.

I'm thinking it has something to do with the boundaries. I've read 
everyone's example on that page and followed the links to the 1993 MIME 
specs on the Mindspring site but am still getting nowhere. Has anyone 
else ever had this problem? If so, how did you solve it?
This is a little vague. You may want to try this class to compose and 
send messages with attachments.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Formatting numbers

2003-07-24 Thread David Smith

Thanks. That works perfectly.
David Smith



-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 3:36 PM
To: David Smith; php-db
Subject: Re: [PHP-DB] Formatting numbers


  I am a little new to PHP, but I am trying to pull numbers from a database
 that has both phone numbers and social security numbers for a client. My
 Client doesn't want the numbers to come out like 55 but (555)
 555-. My question is can I use format_number() to do this and if so
how
 do I make it change from a comma and every three spaces to fit the formats
 above? I know that this is probably pretty simple, but I can't seem to
find
 the answer anywhere (possibly right under my freakin' nose :D).

Use substr() to grab the pieces you want and add formatting around them.

us2.php.net/substr

---John Holmes...


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




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



[PHP-DB] Function Name available within function?

2003-07-24 Thread Peter Beckman
Is there some sort of master variable which will tell you which function
you are currently in?

Like __FUNCTION__ like there is for __FILE__ and __LINE__... Something like
that.  Even a function that does that?

I am writing a program in which several functions refer back to themselves
by name, and it'd be nice to be able to do it dynamically.  If I change a
function name, then I have to change (currently) the string that contains
the function name within that function.

Peter
---
Peter Beckman  Internet Guy
[EMAIL PROTECTED] http://www.purplecow.com/
---

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



[PHP-DB] Re: Function Name available within function?

2003-07-24 Thread Joe Penn
Yes - __FUNCTION__ would hold ( string )[function name]

Peter Beckman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Is there some sort of master variable which will tell you which function
 you are currently in?

 Like __FUNCTION__ like there is for __FILE__ and __LINE__... Something
like
 that.  Even a function that does that?

 I am writing a program in which several functions refer back to themselves
 by name, and it'd be nice to be able to do it dynamically.  If I change a
 function name, then I have to change (currently) the string that contains
 the function name within that function.

 Peter
 --
-
 Peter Beckman  Internet
Guy
 [EMAIL PROTECTED]
http://www.purplecow.com/
 --
-



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