I have this code that sends a text message to your mobile phone…
$text = fopen("../data/textmembers/registry.txt","r") or die("couldent open file");
while (!feof($text)) {
$name = fgets($text);
$number = fgets($text);
$carrier = fgets($text);
$date = fgets($text);
$line = fgets($text);
$content = $_POST['message'];
$message .= $content;
$message .= "\n";
$number = trim($number);
mail($number . "@vtext.com", "SGA Event Alert", $message, "SGA");
Header("Location: mailconf.php");
everything works fine.. Here is my question, if you look at where I have “@vtext.com”
as you may or may not know, each carrier has its own extension, verizon is @vtext.com, at&t is @txt.att.net. I need to take the feed from “$carrier” decide what carrier it is, and then assign the extension to it…
I thought an ifelse would work, but I am not good with if statements…
the user’s choices are
Verizon = 1234567890@vtext.com
AT&T = 1234567890@txt.att.net
T-mobile = @tmomail.net
Nextel = @messaging.nextel.com
thanks guys!!
Then, you get that value by looking up the key:
If
$carrieris “Nextel,” “messaging.nextel.com” will be returned.