[PHP-DB] Newbie Question $2

2014-06-16 Thread Ethan Rosenberg
Dear List - I have the following code: The input from the form is a 10 digit string [1234567890] which is converted to phone number format [123-456-7890] $phn = $_POST[phone]; $phn = (string)$phn; $dsh = '-'; $Phn =

Re: [PHP-DB] Newbie Question $2

2014-06-16 Thread Karl DeSaulniers
On Jun 16, 2014, at 9:58 PM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear List - I have the following code: The input from the form is a 10 digit string [1234567890] which is converted to phone number format [123-456-7890] $phn = $_POST[phone]; $phn = (string)$phn;

Re: [PHP-DB] Newbie Question $2

2014-06-16 Thread Aziz Saleh
On Mon, Jun 16, 2014 at 10:58 PM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear List - I have the following code: The input from the form is a 10 digit string [1234567890] which is converted to phone number format [123-456-7890] $phn = $_POST[phone]; $phn = (string)$phn;

Re: [PHP-DB] Newbie Question $2

2014-06-16 Thread Karl DeSaulniers
On Jun 16, 2014, at 10:05 PM, Karl DeSaulniers k...@designdrumm.com wrote: On Jun 16, 2014, at 9:58 PM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear List - I have the following code: The input from the form is a 10 digit string [1234567890] which is converted to phone

Re: [PHP-DB] Newbie Question $2

2014-06-16 Thread Mike Stowe
Oh a few quick things. First, you can use substr to break up the phone instead of grabbing characters- might be a little easier to read long term. Secondly, mysql_real_escape_string will return the cleaned string, but doesn't change the original variable. So you'll need $phn =