tcollins412 0 Junior Poster

i have a script that sends an email to cellphones:

<form name='celltest' method=post>
<input type=hidden name=cellsubmit value=yes>
<tr><td rowspan=1>Mobile Phone: <input type='text' class='efield' id='phone' name='phonetest' style='width: 200px;'></td><td style='padding-bottom: 15px; padding-left: 3px;'>&nbsp;<a href="?ref=ea&dotest=1" class='eap' style='width: 50px;'>Test</a></td></tr></table></td></tr><tr><td style='font-size: 12px; text-align: left; padding-top: 2px; padding-left: 35px;'>Provider: <select name=provider class=efield style='width:258px;' id='provider'>
<option value="0">Select One</option>
<option value="1">Alltel
<option value="2">AT&T Wireless
<option value="4">Boost Mobile
<option value="5">Cellular One
<option value="6">Centennial Wireless
<option value="7">Cingular 
<option value="8">Cingular Prepaid
<option value="9">Cricket
<option value="10">MetroPCS
<option value="11">Nextel
<option value="12">Qwest Wireless
<option value="14">Sprint (Nextel)
<option value="13">Sprint (PCS)
<option value="15">T-Mobile
<option value="16">TracFone
<option value="17">US Cellular
<option value="19">Verizon Wireless
<option value="18">Virgin Mobile
</select></td></tr>
<tr><td style='height: 15px;'></td></tr>
<tr><td style='padding-left: 2px;'><a href='javascript: submitphchange();' class='ea' style='width: 340px;'>Change Phone</a></td></tr></td></tr></form>

and here is the php:

if ($_GET['dotest']=='1'){
    $to=$_POST['phonetest'];
    $provider=$_POST['provider'];
	if ($provider=='1'){
	$end="@alltelmessage.com";
}else if ($provider=='2'){
	$end="@txt.att.net";
}else if ($provider=='4'){
	$end="@myboostmobile.com";
}else if ($provider=='5'){
	$end="@sbcemail.com";
}else if ($provider=='6'){
	$end="@cwemail.com";
}else if ($provider=='7'){
	$end="@mycingular.com";
}else if ($provider=='8'){
	$end="@mobile.mycingular.com";
}else if ($provider=='9'){
	$end="@mms.mycricket.com";
}else if ($provider=='10'){
	$end="@mymetropcs.com";
}else if ($provider=='11'){
	$end="@messaging.nextel.com";
}else if ($provider=='12'){
	$end="@qwestmp.com";
}else if ($provider=='13'){
	$end="@messaging.sprintpcs.com.com";
}else if ($provider=='14'){
	$end="@sprintpaging.com";
}else if ($provider=='15'){
	$end="@tmomail.net";
}else if ($provider=='16'){
	$end="@mmst5.tracfone.com";
}else if ($provider=='17'){
	$end="@email.uscc.net";
}else if ($provider=='19'){
	$end="@vtext.com";
}else if ($provider=='18'){
	$end="@vmobl.com";
}
$to.=$end;
$subject ="Test Message";
$message="This is your crazietoday.com test message";
$mail_from="text@crazietoday.com";
$header="From:". $mail_from;
$send_contact=mail($to,$subject,$message,$header);
if($send_contact){
echo "<span style='font-size: 12px;'><b>- - Your Test Message Has Been Sent - -</b><br />Please Note: This may take a while to recieve</span>";
}
else {
echo "ERROR";
}
}

it is supposed to send an email to the typed email on the click of the test button.i keep getting "ERROR". can anybody help me?