[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang
>> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >> insert into temp ( big5 ) values ( 0x9f54 ); >> insert into temp ( big5 ) values ( 0x9f53 ); >> The 2nd query will report duplicated key. How should I fix the problem? > What does this has to do with PHP? > First of all I

RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
Like I said.. I'm half crocked... So I'm trying my best here... Give me some time... >> > What if you put $temp = $data->legs->leg[$k]['legId']; Does $temp have anything in it? Jake > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 25, 2

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake I am getting nothing at all. Regards Richard > What is the result your getting? > > Jake > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Saturday, March 24, 2007 11:57 PM >> To: Jake McHenry >> Cc: php-general@lists.php.net >> Subject: RE

RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
What is the result your getting? Jake > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 24, 2007 11:57 PM > To: Jake McHenry > Cc: php-general@lists.php.net > Subject: RE: [PHP] Array Question > > Hi Jake > > I tried that and got the sa

RE: [PHP] Re: My own "captcha" from 2 years ago......

2007-03-24 Thread Jake McHenry
Sorry.. Was playing around with dates and how long I've been sitting here watching this generate random numbers. Lol .. The only lines referring to the "captcha" are the img lines... As you can tell... Calling the next script... Should I do it this way? I'm pretty sure that is the problem,

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake I tried that and got the same result. Regards Richard > What if you put $temp = $data->legs->leg[$k]['legId']; > And then put that into $legrow[$temp]; > > Do you have anything in $temp? > > Jake > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> S

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake Thanks for the answer. That is what I had in my example that did not work. I had tried that and then wondered how I might access that key. I have tried $legrow["number"]; where number is a value I know to be one of the legId's. Is this correct? Regards Richard > $legrow["$data->leg

RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
What if you put $temp = $data->legs->leg[$k]['legId']; And then put that into $legrow[$temp]; Do you have anything in $temp? Jake > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 24, 2007 11:27 PM > To: php-general@lists.php.net > Subject

[PHP] Re: My own "captcha" from 2 years ago......

2007-03-24 Thread itoctopus
Hey Jake, I checked the thing, and I tell you I did lots and lots of captchas in my life and they mainly rely on the session. Is it possible for you to post the script so that me (or anyone else for that matter) fix it for you? Take care, -- itoctopus - http://www.itoctopus.com ""Jake McHenry"" <

RE: [PHP] Array Question

2007-03-24 Thread Jake McHenry
$legrow["$data->legs->leg[$k]['legId']"] ?? See if that works... Jake > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 24, 2007 11:27 PM > To: php-general@lists.php.net > Subject: [PHP] Array Question > > Hi All > > I am having a bit o

[PHP] My own "captcha" from 2 years ago......

2007-03-24 Thread Jake McHenry
Well, I've been creating my own... Since like two years ago... Lol.. But this is the KNOWN name now. Anyways... How can I get the info from the image creation script back to my main script? Sessions DO NOT WORK! They give me the previous entry instead of the current.. Which obviously won't work

[PHP] Array Question

2007-03-24 Thread rluckhurst
Hi All I am having a bit of trouble with PHP arrays and would appreciate some help. I currently have the following piece of code $count=count($data->legs->leg); $k=0; while($k < $count) { $legrow[$k]=$data->legs->leg[$k]['legId'].$VM.$data->

RE: [PHP] Computing and calculating dates

2007-03-24 Thread Jake McHenry
Change it to the format strtotime needs? Not hard Or mktime(0, 0, 0, date("m", $date), date("d", $date)+7, date("Y", $date)); for +7 days... Same with + 14 days Strtotime is usefull, you can just put first day next month and it just works... Lol... Then you could explode that back into mkti

[PHP] Re: is pecl.php.net down?

2007-03-24 Thread martin
thanks Greg, it's back running Martin "Gregory Beaver" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > martin wrote: >> Since about 7 hours now i can't get on the pecl.php.net pages. The site >> doesn't seem to be available. >> >> Does somebody know why? > > Hi Martin, >

[PHP] Re: is pecl.php.net down?

2007-03-24 Thread Gregory Beaver
martin wrote: > Since about 7 hours now i can't get on the pecl.php.net pages. The site > doesn't seem to be available. > > Does somebody know why? Hi Martin, The entire machine that runs pear.php.net and pecl.php.net was down for a very long time. It has recently come back up online, you shou

[PHP] is pecl.php.net down?

2007-03-24 Thread martin
Since about 7 hours now i can't get on the pecl.php.net pages. The site doesn't seem to be available. Does somebody know why? Thanks, Martin J'utilise la version gratuite de SPAMfighter pour utilisateurs privés. 4

[PHP] �G�b�`�Ȑl�ȑ��W��

2007-03-24 Thread �ɓ����
■[NANA]さんからメッセージが1通届いています■ http://hame-taosi.org/free/as00101/faeataia01/ NANAだょん♪今わぁ大学の春休みなんで毎日お休みっす! 暇ばっかしてたら死んじゃうからぁ遊んでょぉ☆ 年上の優しい人とドライブとã

Re: [PHP] Computing and calculating dates

2007-03-24 Thread Otto Wyss
Travis Doherty wrote: Otto Wyss wrote: local_formated_date + 7; // days local_formated_date > local_formated_first_day_next_month; local_formated_date > (current_date + 14) etc. Which functions are best suited for such calculations? O. Wyss www.php.net/strtotime is probably a good star

RE: [PHP] What is wrong with this function please?

2007-03-24 Thread Jake McHenry
> > No sorry, both messages are the same. > Didn't mean to post it twice. Sorry. > > Below is what prints out when I echo the message: > > $to > [EMAIL PROTECTED] > > $subject > Proposal Submission > > $headers > From: 2HostMe Mailer Reply-To: Robin Wilson Return-Path: > 2HostMe Mailer > Me

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Robert Cummings
On Sat, 2007-03-24 at 14:38 -0400, tedd wrote: > At 2:24 PM -0400 3/24/07, Robert Cummings wrote: > >On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: > >> At 7:47 PM -0500 3/23/07, Richard Lynch wrote: > >> >Folks: > >> > > >> >How often do you use a loop of any kind in PHP with enough iterations

Re: [PHP] Performance: While or For loop

2007-03-24 Thread tedd
At 2:24 PM -0400 3/24/07, Robert Cummings wrote: On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: At 7:47 PM -0500 3/23/07, Richard Lynch wrote: >Folks: > >How often do you use a loop of any kind in PHP with enough iterations >that this is even significant? > >Write the code that makes sens

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Robert Cummings
On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: > At 7:47 PM -0500 3/23/07, Richard Lynch wrote: > >Folks: > > > >How often do you use a loop of any kind in PHP with enough iterations > >that this is even significant? > > > >Write the code that makes sense. > > > >Optimize the biggest bottleneck unt

[PHP] Re: Book Suggestion for ZCE

2007-03-24 Thread itoctopus
Sams - Zend Php Certification Study Guide for the certification. An excellent book on PHP is PHP5 Power Programming (by Prentice Hall). -- itoctopus - http://www.itoctopus.com ""Danial Rahmanzadeh"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hey dudes, > i want to know that whic

[PHP] Luhn algorithm

2007-03-24 Thread itoctopus
Here's the Luhn algorithm in PHP. The Luhn algorithm is mainly used to check if a credit/debit card number is valid or not. Please tell me if there's a bug somewhere, I've tested the thing heavily and it's working like a charm. /* [EMAIL PROTECTED] check_luhn [EMAIL PROTECTED] This function chec

Re: [PHP] Computing and calculating dates

2007-03-24 Thread itoctopus
In case you're doing so only for database update/check, then you can use mysql's built-in date_add function. In case you really want it in PHP, then here's a link simultating: http://news.hping.org/comp.lang.php.archive/10638.html -- itoctopus - http://www.itoctopus.com "Travis Doherty" <[EMAIL

Re: [PHP] trans id problem

2007-03-24 Thread Juergen Wind
>* restart apache on the server side restarting the server is not neccessary if php_values/flags are changed via .htaccess >* in the page containing the method=POST form there must >be "" tags somewhere with the PHPSESSID in the >form's HTML source php does this automagically, you can s

Re: [PHP] Name Capitalization

2007-03-24 Thread Paul Novitski
At 3/23/2007 07:27 PM, Richard Lynch wrote: > In this case, the OP has an existing list of names he wants to > de-capitalize, not an ongoing stream of new names from people who > might be trained. The solution remains: Hire a human. The computer will never get accurate enough. The exception m

Re: [PHP] how to control if it is a date

2007-03-24 Thread Alain Roger
thanks i did not know it. On 3/24/07, Brice <[EMAIL PROTECTED]> wrote: On 3/24/07, Alain Roger <[EMAIL PROTECTED]> wrote: > > Hi, > > user can enter a string with following format dd.mm.. > Application should transform it to postgresql timestamp date. > > however, i would like to be sure

Re: [PHP] how to control if it is a date

2007-03-24 Thread Brice
On 3/24/07, Alain Roger <[EMAIL PROTECTED]> wrote: Hi, user can enter a string with following format dd.mm.. Application should transform it to postgresql timestamp date. however, i would like to be sure that what user typed is a real and valid date. how can i do that ? With checkdate i

[PHP] how to control if it is a date

2007-03-24 Thread Alain Roger
Hi, user can enter a string with following format dd.mm.. Application should transform it to postgresql timestamp date. however, i would like to be sure that what user typed is a real and valid date. how can i do that ? i was thinking to use date(string format, strtotime(string_entered_by_u

Re: [PHP] preview string with strlen PHP (help)

2007-03-24 Thread tedd
2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: > YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that's why my mailbox is set to display 'Németh Zoltán' bu

Re: [PHP] Computing and calculating dates

2007-03-24 Thread Travis Doherty
Otto Wyss wrote: > This probably has been asked several times yet I can't find a > satisfying solution. What's the simplest way to compute dates like > > local_formated_date + 7; // days > local_formated_date > local_formated_first_day_next_month; > local_formated_date > (current_date + 14)

Re: [PHP] newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Jochem Maas
Tijnema ! wrote: > On 3/24/07, Man-wai Chang <[EMAIL PROTECTED]> wrote: >> >> create table temp ( big5 char(2) ) character set big5 collate big5_bin; >> insert into temp ( big5 ) values ( 0x9f54 ); >> insert into temp ( big5 ) values ( 0x9f53 ); >> >> The 2nd query will report duplicated key. How s

Re: [PHP] What is wrong with this function please?

2007-03-24 Thread Jochem Maas
phpmailer.sourceforge.net - a mailing class for php that does everything you need, there are other alternatives - definitely beats fiddling with all the required headers yourself. save yourself a big headache. :-) Robin Wilson wrote: > Hello > > I'm trying to do a function that emails users and

Re: [PHP] Performance: While or For loop

2007-03-24 Thread tedd
At 7:47 PM -0500 3/23/07, Richard Lynch wrote: Folks: How often do you use a loop of any kind in PHP with enough iterations that this is even significant? Write the code that makes sense. Optimize the biggest bottleneck until performance is acceptable. Absolutely -- the time we take discussi

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Sancar Saran
Hi, I'm using so much FOR loops in my code, after seeing discussion I try to test. My findigs it was giving %2 to %10 percent performance boost. So ? My recent template addon to this code cost me around %5 to %10 percent of total page process.. I think It was nice trade off. Thank you guys.

Re: [PHP] Random Unique ID

2007-03-24 Thread Robert Cummings
On Sat, 2007-03-24 at 08:24 -0400, Jim McIntyre wrote: > IIRC, the OP wanted to generate a unique key precisely to keep from > revealing the record ID to the end user... what about taking the > auto_increment value (easy to generate, assured to be unique) adding its > MD5 hash to another column in

Re: [PHP] What is wrong with this function please?

2007-03-24 Thread Robin Wilson
No sorry, both messages are the same. Didn't mean to post it twice. Sorry. Below is what prints out when I echo the message: $to [EMAIL PROTECTED] $subject Proposal Submission $headers From: 2HostMe Mailer Reply-To: Robin Wilson Return-Path: 2HostMe Mailer Message-ID: X-Mailer: PHP v4.4.2 MIM

Re: [PHP] Random Unique ID

2007-03-24 Thread Jim McIntyre
IIRC, the OP wanted to generate a unique key precisely to keep from revealing the record ID to the end user... what about taking the auto_increment value (easy to generate, assured to be unique) adding its MD5 hash to another column in the table, then using that as the "published" ID? The only dis

[PHP] Computing and calculating dates

2007-03-24 Thread Otto Wyss
This probably has been asked several times yet I can't find a satisfying solution. What's the simplest way to compute dates like local_formated_date + 7; // days local_formated_date > local_formated_first_day_next_month; local_formated_date > (current_date + 14) etc. Which functions are b

Re: [PHP] trans id problem

2007-03-24 Thread Holger Blasum
Hello Luciano, > i have a big problem with form with method post. > the php correclty add the hidden session variables > but it seem that it does not arrive to the page. Having toggled session's use_trans_sid first time myself last week, take care to: * restart apache on the server side (you a

Re: [PHP] newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Tijnema !
On 3/24/07, Man-wai Chang <[EMAIL PROTECTED]> wrote: create table temp ( big5 char(2) ) character set big5 collate big5_bin; insert into temp ( big5 ) values ( 0x9f54 ); insert into temp ( big5 ) values ( 0x9f53 ); The 2nd query will report duplicated key. How should I fix the problem? What d

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Tijnema !
On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> Folks: >> >> How often do you use a loop of any kind in PHP with enough >> iterations >> that this is even significant? >> >> Write the c

Re: [PHP] close session when browser is closed

2007-03-24 Thread Juergen Wind
Your application/session will never get any information whether the user closes his browser or a tab! Even the lifetime of the session cookie is depending on which browser the user is on and if any other window is open. So the only solution would be polling some "watchdog.php" using a XMLHttpRequ

Re: [PHP] close session when browser is closed

2007-03-24 Thread Alain Roger
So i would like to have it well done as following : 1. if user close the browser : session is destroyed and user is redirected to main HTTPS page (the login one) 2. if user close the TAB in which the web application worked, the session data (so cookies if i understood well) should be destroyed to