Ok, it's really weird. When I test the to see the two variables which will make up the email address
<?php
$carrier = $_POST['carrier'];
$number1 = $_POST['number1'];
$number2 = $_POST['number2'];
$number3 = $_POST['number3'];
$number = $number1.$number2.$number3;
$pin = rand(1, 9).rand(0, 9).rand(0, 9);
$code = $pin;
if($carrier == 1){
$displaycarrier = "Verison";
$site = "vtext.com";
} elseif($carrier == 2){
$displaycarrier = "AT&T";
$site = "txt.att.net";
} elseif($carrier == 3){
$displaycarrier = "Sprint";
$site = "messaging.sprintpcs.com";
} elseif($carrier == 4){
$displaycarrier = "T-Mobile";
$site = "tmomail.net";
} elseif($carrier == 5){
$displaycarrier = "MetroPCS";
$site = "mymetropcs.com";
} elseif($carrier == 6){
$displaycarrier = "Virgin Mobile";
$site = "vmobl.com";
} elseif($carrier == 7){
$displaycarrier = "Beyond GSM";
$site = "txt.att.net";
} elseif($carrier == 8){
$displaycarrier = "Centennial";
$site = "cwemail.com";
} elseif($carrier == 9){
$displaycarrier = "Cellular South";
$site = "csouth1.com";
} elseif($carrier == 10){
$displaycarrier = "Cincinnati Bell";
$site = "gocbw.com";
} elseif($carrier == 11){
$displaycarrier = "Boost Mobile";
$site = "myboostmobile.com";
} elseif($carrier == 12){
$displaycarrier = "Nextel";
$site = "messaging.nextel.com";
} elseif($carrier == 13){
$displaycarrier = "Alltel";
$site = "message.alltel.com";
} elseif($carrier == 14){
$displaycarrier = "Qwest";
$site = "qwestmp.com";
} elseif($carrier == 15){
$displaycarrier = "Cricket";
$site = "MMS.mycricket.com";
} elseif($carrier == 16){
$displaycarrier = "Bell";
$site = "txt.bellmobility.ca";
} elseif($carrier == 17){
$displaycarrier = "Telus";
$site = "msg.telus.com";
} elseif($carrier == 18){
$displaycarrier = "Rogers";
$site = "pcs.rogers.com";
} elseif($carrier == 19){
$displaycarrier = "Fido";
$site = "fido.ca";
}else {
$site = "example.com";
}
if( isset($_POST['Submitter']) && !empty($_POST['Submitter']) )
{
$to = "my_email_address@example.com"; // instead of my email, this will be replaced with "$number@$site", and the "$number@$site" below is only for debugging, and is bugged, this is where you notice where it glitches!
$subject = "";
$body = "$number@$site Hi. Your code is $code. If you were not expecting this text message, sorry, someone entered the wrong number, please ignore it.";
$headers = "From: email_address@example.comrn" .
"X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Verify SMS reminder sign-up</title>
<link rel="Shortcut Icon" href="favicon.ico">
</head>
<body>
<font face="Arial, Helvetica, sans-serif">
<p>Step 5.<br />
Make sure the info you entered is correct. If it's fine, skip this step.<br />If it's wrong, click the button to correct it.</p>
<?php
echo "$number@$site<br />"; //[DEBUGING FEATURE ONLY]: So here if the number is 1234567890 and the carrier is verison (vtext.com) it will display 1234567890@vtext.com
// use it
echo "You entered:<br /><i>Cell phone carrier:</i><b> $displaycarrier</b><br /><i>Cell phone number:</i><b> $number1-$number2-$number3</b>";
?>
<form><input type="button" value="Woops, let me fix a mistake" onClick="history.go(-1);return true;"></form>
<br />
<p>Step 6.<br />
To make sure that the number you entered is actually yours, we will send a text message to "your" phone.<br />
In the message you will find a 3 didget code. Enter that in the text box that asks for it. You may now click<br />
the button below to send the pin to your phone. If you do not recieve the pin within 5 minutes, click it again.</p><br />
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">-----[[[[[[[[[[sdkfjdksajfkasdjfkdsafldsajflsadfsadfk that was to get your attension, COMMENTS WONT WORK HERE SO REMOVE THIS STUFF, NOW HERE IS MY "COMMENT": When I send it to my email address, it appears as '@example.com', which means somehow $number and $site (leading up to $carrier) somehow changed to nothing! Very odd...]]]]]]]]]]-----
<input type="submit" name="Submitter" id="Submitter" value="Send the code to my phone" />
</form>
</font>
</body>
</html>
Ok, so when you do the echo, it displays "1234567890@vtext.com" if you enter that stuff. But for some strange reason, when you email it with the variables, they reset!!!
I would really appreciate someone more skilled than me (that's pretty much anyone, lol) in php to point out what is wrong and how I can fix it. Thanks!