djbridger12345 Posted July 7, 2011 Share Posted July 7, 2011 I was wondering if someone could help with some php scripting, at the moment i have a simple html form which connects to voipcheap.co.uk and can send a sms message using my own mobile phone number, hence when i login and send from form it looks like it is coming from my mobile. Now i would like to enhance this somewhat as i would like to send a confirmation sms for a service that i offer his would be in the format of a form asking me questions Name of Visitor Location (visitor has to come to) always the same How Many Peope (1-8 people) are coming What Date they are coming What time they are going to arrive this confirmtion then wil get sent to the visitor I then want this info saved to a database Name Date they came and of course the mobile number I then wil be able to use this info to send out a promotion later in the year to all my customers In which i would like to send out multiple sms messages, not sure at the mo if voipcheap.co.uk would be the right service for this. As the database could grow to several thousand customers i also like to select which customers to send out to by date eg those that visited in last 3 months or 6 months etc Also would have to consider when entering into the form if the visitor has been before and the number is already databased. well i hope somebody can help me on my way as my friend who is a php friend has let me down and has been untraceable for months. I can create databases with phpmyadmin and have my own centos server for playing about with but have only fiddled with php before such as creating an email form that sends out using php etc etc Hope to hear from someone soon cheers Quote Link to comment https://forums.phpfreaks.com/topic/241339-sms-php-scripting-help-needed/ Share on other sites More sharing options...
Adam Posted July 7, 2011 Share Posted July 7, 2011 While you've provided plenty of useful information, you've not actually asked a question. We're happy to help with any problem you have, but laying a specification down and hoping for us to basically walk you through the whole implementation isn't going to get you anywhere. Try and be specific with your questions so that we have something to go off.. Quote Link to comment https://forums.phpfreaks.com/topic/241339-sms-php-scripting-help-needed/#findComment-1239684 Share on other sites More sharing options...
djbridger12345 Posted July 7, 2011 Author Share Posted July 7, 2011 i have seen code provided by mobile phone companies but that is always to send 1 message to 1 user i will gladly post the snippets i have collected and saved if that could help me you must understand i am not a php programmer but i can look at thins an look up what they are doing. For example my very basic web form at the mo does this <form action="https://www.voipcheap.co.uk/myaccount/sendsms.php" method="get"> <input name="username" type="hidden" value="myusername" /> <input name="password" type="hidden" value="mypassword" /> <input name="from" type="hidden" value="mymobilenumber" /> <input name = "to" class="disabledText" value="447" onfocus="enableField(this) size = "25" maxlength = "15" type = "text"> Message </br> <textarea rows="10" name="text" cols="20"></textarea> <input type="submit" value="Submit" /> </form> So first i need the message value saving to a database as several seperate lines eg Name of Visitor Location (visitor has to come to) always the same How Many Peope (1-8 people) are coming What Date they are coming What time they are going to arrive as seperate rows so if that is sent out as a message thats how it appears when it is opened so how firstly is if each line is entered as as a field into a database how does the message get sent out as that i know 160 characthers is the limit on sending out, but i would like the client to see a clear line for line confirmation. and then this is the part i would probaly get lost on is if the sending out more than 1 message eg a bulk send would the script need a loop to keep sending out Or maybe am i best off offering some dosh for someone to create this, cant afford much thats why thought i would have a go myself but really not sure where to start! Ps Thanks for your quick reply will be in all day tomos if someone could spend the time eg start the code build database once i get a start im sure i could get it going Quote Link to comment https://forums.phpfreaks.com/topic/241339-sms-php-scripting-help-needed/#findComment-1239694 Share on other sites More sharing options...
djbridger12345 Posted July 8, 2011 Author Share Posted July 8, 2011 any one around to give me a bit of a kickstart in the right direction, i know i can create the html form to save info into a database, but how do i send the message out from say 4 or 5 fields?? Quote Link to comment https://forums.phpfreaks.com/topic/241339-sms-php-scripting-help-needed/#findComment-1240029 Share on other sites More sharing options...
Adam Posted July 8, 2011 Share Posted July 8, 2011 This really isn't difficult to implement. You just need to know how to query a database and concatenate strings. No idea what your API for sending the messages is like, so can't comment on that. I assume though it'll just be a string of recipients delimited by a special character, or you loop through an array of recipients and repeatedly call some construct. Just tackle it one step at a time; * set-up the database table structure * create the form for inserting into the table * query the table for the data * concatenate the fields together * check for length restrictions * call API to send message If you get stuck at any of these points, come back here and explain to us the problem. You're going to get far better support for those kind of questions than.. Well a very broad range of problems that most people don't have the time to talk you through. Quote Link to comment https://forums.phpfreaks.com/topic/241339-sms-php-scripting-help-needed/#findComment-1240062 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.