[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__... So

[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

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 da

Re: [PHP-DB] Formatting numbers

2003-07-24 Thread CPT John W. Holmes
> 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 h

[PHP-DB] Formatting numbers

2003-07-24 Thread David Smith
BlankHi, 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

Re: [PHP-DB] Email with attachments - Dan's solution works!

2003-07-24 Thread Diana Cassady
Dan! Thanks so much! I plugged the code in and it worked like a charm on my very first test! Awesome. I spent hours on this yesterday and today. You saved me tears of defeat. Thanks again. Diana [EMAIL PROTECTED] "Will Work for Chocolate" http://www.vivaladata.com

[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

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);

[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 s

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"

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

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, visi

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

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:

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

2003-07-24 Thread Aaron Wolski
Its funny... I try not to use them either.. but a lot of times I just have to or I get the results that Michael was experiencing. Perhaps it comes down to a matter of how you structure your if() statements. Aaron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent

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

2003-07-24 Thread Hutchins, Richard
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 s

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

2003-07-24 Thread Aaron Wolski
Well... I actually solved this an hour ago. $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 = '';

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 >

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

[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 n

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...

[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 ma

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] 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";

Re: [PHP-DB] Condition for Adding data (Still Having Problems)

2003-07-24 Thread gatimu
Hi Guys, I though maybe I can be more specific so you can see the problem I havin, The idea of having this code on my pgae was to execute a decision from a form input so that once a value has been choosen by a user a page unique to what he/she choose appears So my Page looks soemthing like this