Re: [PHP-DB] Newbie Question $2

2014-06-17 Thread Ethan Rosenberg, PhD
On 06/17/2014 12:02 PM, onatawah...@yahoo.ca wrote: Hi Ethan, Here are some things to clean up your code: Your line: $phn = $_POST[phone]; should use quotations as follows: $phn = $_POST['phone']; Your line: $sql1 ='select Lname, Fname from Customers where Phone = $Phn '; Should use doubl

Re: [PHP-DB] Newbie Question $2

2014-06-17 Thread onatawah...@yahoo.ca
Hi Ethan, Here are some things to clean up your code: Your line: $phn = $_POST[phone]; should use quotations as follows: $phn = $_POST['phone']; Your line: $sql1 ='select Lname, Fname from Customers where Phone = $Phn '; Should use double quotes if you need the variable to be interpreted:

Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Aziz Saleh
IMO a newbie is someone who read the docs and understood them (at least in theory) before they attempt to write code, which doesn't seem to be the case. On Tue, Jun 17, 2014 at 10:04 AM, Jim Giner wrote: > We're all so eager to help out poor Ethan (who many of you know is NOT a > newbie) but no

Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
On 6/17/2014 10:51 AM, Lester Caine wrote: On 17/06/14 15:04, Jim Giner wrote: We're all so eager to help out poor Ethan (who many of you know is NOT a newbie) but nowhere does Ethan say what difficulty he is having. The suggestions made so far are great but what are we solving? I see you have

Re: [PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Lester Caine
On 17/06/14 15:04, Jim Giner wrote: > We're all so eager to help out poor Ethan (who many of you know is NOT a > newbie) but nowhere does Ethan say what difficulty he is having. > > The suggestions made so far are great but what are we solving? I see you have spotted the original question :) The o

[PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
Finally figured out what the question was! Here's a better version of your code Ethan: $phn = $_POST['phone']; // note the quotes on the index if (strlen($phn) <> 10) { echo "Error in phone number entry - must be 10 digits"; exit(); } $phn = mysqli_real_escape_string($cxn,$phn);

[PHP-DB] Re: Newbie Question $2

2014-06-17 Thread Jim Giner
We're all so eager to help out poor Ethan (who many of you know is NOT a newbie) but nowhere does Ethan say what difficulty he is having. The suggestions made so far are great but what are we solving? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u