Hi,
Which are you having the problem with? The creation of the form and PHP code to process the form? Or the PHP for sending SMS?
Do you already have some php written that you could post?
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
I'm still struggling with both the form and the php code.
I started a few times with a basic form with the following fields: subject, name, cell number & text box. Where i'm really stuck at is, in the 'cell number' text box I would like for that to go to the provider's gateway....but I don't know how to set it up so that once someone inputs the receipient cell number it goes out like this: [email]1234567890@provider.com[/email] etc.
Suggestions please.
You'll need a good tutorial on HTML forms and PHP form processing.
You'll also need to look up string concatenation in PHP.
I assume you're trying to send TXT messages by using the Email to SMS gateways provided freely by the cell providers.
In order to do this, you'll need the email domain for each cell providers. Do you already have this list?
Once you have this list, you just display the list to the users in a box.
eg:
<select name="provider">
<option value="tmobile.com">T-Mobile</option>
...
</select>
You'll also need the phone number of course.
When the form is submitted, you receive the form submission as a HTTP POST, or GET depending on the form method.
So the provider would be in:
$_POST['provider'];
for a post method.
You take the phone number and concatenate it with the provider and send it via email using the:mail() function.
http://php.net/mail/
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101
I guess what you have is a single sms to email gateway. So all you need is to put the number and the domain for that sms gateway together?
All you need then is to concatenate the phone number provided by the user via the form, to the SMS gateway domain.
eg:
<?php
$number = $_GET['number'];
$email = $number.'@provider.com';
mail($email, ... etc... );
?>
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101