phone number not storing in database
Moderator: General Moderators
Re: phone number not storing in database
First thing I see is you're closing PHP tags far too early.
Re: phone number not storing in database
I don't see any inserts in there, only selects. This code doesn't save anything to the DB.
Re: phone number not storing in database
$_POST['customer_phone'] is an array. You're using a loop to send the messages, but not to record them to the DB.
Re: phone number not storing in database
Yes. You have an array of values and you want an entry for each, right?
Re: phone number not storing in database
There are also repeated chunks of code in your form. These could easily be abstracted away to a function.
Re: phone number not storing in database
I'm looking at this specifically.
If you ever wanted to change that, you'd need to change is in a number of places.
Code: Select all
$sqlCommand = "SELECT id, customer_name, customer_phone FROM repairs WHERE customer_phone LIKE '%44%' AND customer_name BETWEEN 'a' AND 'e' GROUP BY customer_name";