943,910 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5851
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jun 19th, 2009
0

Re: php + mysql for web sms

Most of gateway provider provide you PHP library to help you to that.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
foryounow is offline Offline
12 posts
since Mar 2005
Oct 19th, 2010
0
Re: php + mysql for web sms
I have been working on some code for this, which isn't working, but isn't kicking back errors either. If anyone is still reading this post, I'd appreciate some feedback.

Here's the form:
PHP Syntax (Toggle Plain Text)
  1. <div id="smsbox"><p class="smsbox"><form name="smsform" method="post" action="test_sms.php"/>Enter Mobile Number<input type="text" value="mobile #" name="mobile" size="14"/>
  2. <select name="carrier">
  3. <option>-Select Carrier-</option>
  4. <option value="@message.alltel.com">Alltel</option>
  5. <option value="@paging.acswireless.com">Ameritech</option>
  6. <option value="@txt.att.net">AT&amp;T</option>
  7. <option value="@sms.bellsouth.com">BellSouth</option>
  8. <option value="@myboostmobile.com">Boost</option>
  9. <option value="@mobile.celloneusa.com">CellularOne</option>
  10. <option value="@sms.edgewireless.com">Edge</option>
  11. <option value="@mobile.mycingular.com">Cingular</option>
  12. <option value="@mymetropcs.com">MetroPCS</option>
  13. <option value="@messaging.nextel.com">Nextel</option>
  14. <option value="@qwestmp.com">Qwest</option>
  15. <option value="@pcs.rogers.com">Rogers</option>
  16. <option value="@messaging.sprintpcs.com">Sprint</option>
  17. <option value="@msg.telus.com">Telus</option>
  18. <option value="@tmomail.net">T-Mobile</option>
  19. <option value="@email.uscc.net">US Cellular</option>
  20. <option value="@vtext.com">Verizon</option>
  21. <option value="@vmobl.com">Virgin</option>
  22. </select>
  23. <input type="submit" name="submit" value="send sms"></form></div>

And here's the respective PHP handler.

PHP Syntax (Toggle Plain Text)
  1. <?
  2. $from = "my@email.com";
  3. $to = $_POST['mobile'];
  4. $carrier = $_POST['carrier'];
  5. $to = $mobile.$carrier;
  6. $subject = "Test mail";
  7. $message = "Hello! This is a simple email message.";
  8. $headers = "From: $from";
  9. mail($to,$subject,$message,$headers);
  10. echo "Mail Sent.";
  11. ?>
Reputation Points: 10
Solved Threads: 0
Light Poster
GreaseJunkie is offline Offline
33 posts
since Oct 2010
Oct 20th, 2010
0
Re: php + mysql for web sms
Never mind. This works like a charm. This kid is nice My host was running me on an old server with outdated PHP and M$ IIS. (It was my first hosting package I ever bought back in '02 and thought M$ would be best - Linux servers are much better, IMHO.) I updated to 5.x, 7.0 IIS and it's running as desired.
Reputation Points: 10
Solved Threads: 0
Light Poster
GreaseJunkie is offline Offline
33 posts
since Oct 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: store CHECKED checkboxes as variables
Next Thread in PHP Forum Timeline: Required fields in PHP form





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC