[PHP] Re: losing session variable

2007-05-06 Thread itoctopus
session_write_close(); -- itoctopus - http://www.itoctopus.com ""Alain Roger"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have the following code : > >session_start(); >> $_SESSION['username']=$myusername; >> $_SESSION['Localization'] = $lang; >> head

Re: [PHP] Removing commas from number

2007-05-06 Thread Paul Novitski
At 5/6/2007 09:39 AM, Todd Cary wrote: You make a good point. What is your suggestion for the following sequence: $number = $row->AMOUNT; // Get the double from MySQL To display the number in the HTML edit field, I do $display_number = number_format($number, 2, '.', ''); The user may enter a

Re: [PHP] Removing commas from number

2007-05-06 Thread Todd Cary
Paul - You make a good point. What is your suggestion for the following sequence: $number = $row->AMOUNT; // Get the double from MySQL To display the number in the HTML edit field, I do $display_number = number_format($number, 2, '.', ''); The user may enter a character that will not be acce

[PHP] losing session variable

2007-05-06 Thread Alain Roger
Hi, I have the following code : session_start(); $_SESSION['username']=$myusername; $_SESSION['Localization'] = $lang; header("Location: https://".$_SERVER['SERVER_NAME'].$path_adm_files."/modules/welcome/welcome.php"); if i check before header command what is the value of $_S

Re: [PHP] Removing commas from number

2007-05-06 Thread Paul Novitski
At 5/6/2007 08:33 AM, Todd Cary wrote: Thanks to the suggestions, I use number_format($my_number, 2) to format the number in an edit field. Now I need to reenter it into MySQL. How should I use preg_replace to remove the commas? This removes the commas *and* the decimal point: preg_replace(

Re: [PHP] Removing commas from number

2007-05-06 Thread Tijnema !
On 5/6/07, Todd Cary <[EMAIL PROTECTED]> wrote: Thanks to the suggestions, I use number_format($my_number, 2) to format the number in an edit field. Now I need to reenter it into MySQL. How should I use preg_replace to remove the commas? This removes the commas *and* the decimal point: preg_r

[PHP] Removing commas from number

2007-05-06 Thread Todd Cary
Thanks to the suggestions, I use number_format($my_number, 2) to format the number in an edit field. Now I need to reenter it into MySQL. How should I use preg_replace to remove the commas? This removes the commas *and* the decimal point: preg_replace('/\D/', '', $str) In reviewing patterns

[PHP] Re: Best way to format double as money?

2007-05-06 Thread itoctopus
I'd use number_format, money_format is OS dependent. -- itoctopus - http://www.itoctopus.com "Todd Cary" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a MySQL DB that stores currency values as doubles. I want to >display the values in the #,##0.00 format. What is the bes

Re: [PHP] mail() only working with php-cli

2007-05-06 Thread Tijnema !
On 5/6/07, Andy B. <[EMAIL PROTECTED]> wrote: Oliver, Yes I also analyzed the log files from apache, but all they are telling me is that I am accesing the file "mail.php" with my browser. Error.log stays empty. I wish that it were possible to reproduce an error when accessing mail() that would

RE: [PHP] mail() only working with php-cli

2007-05-06 Thread Andy B.
Oliver, Yes I also analyzed the log files from apache, but all they are telling me is that I am accesing the file "mail.php" with my browser. Error.log stays empty. I wish that it were possible to reproduce an error when accessing mail() that would somewhat look like this: "cannot access /usr/sb