Need some help with PHP application

Need some help with PHP application SearchSearch
Author Message
Daniel Tok
New member
Username: Dantok

Post Number: 11
Registered: 02-2009
Posted on Friday, May 08, 2009 - 07:04 pm:   

hey guys, i need some suggestions or solutions here.
I`m trying to create and SMS advertising system with NOWSMS.

However, the whole system will be built on PHP and MYSQL.

Question is, When i have populated a list, how do i mass send sms's to them using my sendsms(); function?

I know i can just send in a loop and send the sms's. But i would like to know.

Let's say, a whole list of numbers are shown on the screen. in a table. Next to the numbers are checkboxes. If the check box is checked, then only numbers that have the check box at the side will have txt messages sent out to that particular number.

Once the user has selected the numbers to send the sms's to. User will click and submit, followed by a summary page of which numbers will be sent an sms.

How do i accomplish this checkbox and upon submitting, the php program will know which fields are checked and which numbers to send to based on their checkbox status.

Thanks in advance!
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 757
Registered: 08-2008
Posted on Friday, May 08, 2009 - 08:19 pm:   

Hi Daniel,

When submitting to NowSMS, you can specify a comma delimited list of phone numbers instead of a single phone number.

Note that some APIs have limits on the overall URL length of an HTTP GET request, and although NowSMS does not impose a limit on the number of phone numbers that can be specified in a list, the software APIs you are using may impose a limit.

As an alternative, it is possible to use HTTP POST instead of HTTP GET. When you use HTTP POST, all of the HTTP GET variables are instead sent in the POST data, specifying "application/x-www-form-urlencoded" as the "Content-Type:" (standard web form POST format). Just put all of the variables (everything after the "?") in the post data instead of the URL, and remove the "?" off of the URL. This way you get around any length limitations that your scripting language might impose on HTTP GET URL length.

Now if you have checkboxes in a table on a web form ... usually the way the form is going to be posted to your PHP script is with multiple values in an array instead of as a comma delimited list. Your script would need to convert the array into a comma delimited list.

I don't know of any examples that would show this with checkboxes, but it should be similar to how "select multiple" is handled in a web form. (This is when you have a list that allows you to Ctrl-Click on multiple entries.) If you search PHP programming sites with keywords of select multiple, you should find some references to the array handling that I'm talking about.

--
Des
NowSMS Support