Forum Moderators: bakedjake
You're on the right path. A search for "form to SMS" [google.com] has quite a few results. It's a pretty common function if the SERPs are any indication.
Have you figured it out? I think i can help you on this. I have the same running on my website.
Firstly take note that you will need to have access to an sms gateway, a third party.
The code is exactly the same as for sending normal email.
mail($to,$subject,$message);
The third party will give you instructions on how to send the sms.That means. In Zambia it would be like this
mail($to="260966993300@example.co.zm",$subject="",$message="You have mail");
Subject is blank because that does not apply to sms. As for the recipient number, it must usually begin with the country code(minus the zero).
You are going to have to call upon this when the visitor at your website submits the form, assuming all criteria have been met.
With other providers you have the liberty to preset your sender id.
Hope that helps.
Good Luck!