sms manual input phone number
Moderator: General Moderators
Re: sms manual input phone number
Part of your form processing expects $_POST['customer_phone'] to be a string, part expects it to be an array. I seem to recall you had users pulled from the database and dropped in a select list. Is that functionality still in place, or has it been replaced by the above? The reason I ask is that they both appear to be using the same form field name, which means they will use the same key in the $_POST array, which will lead to all manner of problems. Might be best to post the form (or the page containing it) in its entirety. Ditto for the script that processes the form.
Re: sms manual input phone number
Mostly, yeah. If your checkboxes are customer_phone, your text field could be input_phone or some such, and your form processing would just need to check for both.ianhaney wrote:You mention the select dropdown and the input field is using the same field name so would I just need to change the input field name within the form and then add it in to the php script that processes the form?
Re: sms manual input phone number
You're sending too many arguments to sendSMS. Look at the function signature. Those are the values you need to send and the order in which you need to be sending them. Loop through customer_phone, then send manual_phone.
Re: sms manual input phone number
Code: Select all
foreach ($_POST['customer_phone'] as $customer_phone) {
$response = sendSMS('', '', $customer_phone, $smsmessage, $from);
}
if (isset($manual_phone)) {
sendSMS('username', 'password', $manual_phone, $smsmessage, $from);
}Re: sms manual input phone number
Yeah, separate thread for a separate issue.ianhaney wrote:Ahh got it makes sense when see the coding
so looping is foreach, I thought looping was while code
I got another major issue in regards to the checkboxes and the sms and show hide using jquery
each time I click any of the show or hide links it keeps checking the very first checkbox so it sends the sms to that person even though I don't mean to, shall I start a new post here or would it go in a javascript forum on here?
Is really frustrating me
Re: sms manual input phone number
If you're getting a response from whichever provider you're using to send the SMS and they're saying it has been sent, that's not really something I can help with.ianhaney wrote:Just altered the coding as well you provided and said the sms has been sent but I have not received it, sorry