html.html is below

<form action="734608271.php" method="POST" />
Carrier: 
<select>
    <option name="car" value="nothing">------------------------------</option>
    <option name="car" value="Alltel">Alltel</option>
    <option name="car" value="AT&T">AT&T</option>
    <option name="car" value="BoostMobile">Boost Mobile</option>
    <option name="car" value="CentennialWireless">Centennial Wireless</option>
    <option name="car" value="EinsteinPCS">Einstein PCS</option>
    <option name="car" value="Nextel">Nextel</option>
    <option name="car" value="Sprint">Sprint</option>
    <option name="car" value="T-Mobile">T-Mobile</option>
    <option name="car" value="US Cellular">US Cellular</option>
    <option name="car" value="VerizonWireless">Verizon Wireless</option>
    <option name="car" value="VirginMobile">Virgin Mobile</option>
    <option name="car" value="AT&T">AT&T</option>
</select>

Phone Number: <input type="text" name="num" />
<input type="submit" />

Then 734608271.php is here....

<?php


$connect = mysql_connect("","","");
if (!$connect)
  {
  die("MySQL could not connect!");
  }

$DB = mysql_select_db('');

if(!$DB)
{
die("My SQL could not select Database!");
}

        $Car = $_POST['car'];
        $Num = $_POST['num'];

        if($Car == "Alltel")
        {
            $To = "$Num" . "@message.alltel.com";
        }
        if($Car == "AT&T")
        {
            $To1 = "$Num" . "@txt.att.net";
            $To2 = "$Num" . "@mms.att.net";
        }
        if($Car == "BoostMobile")
        {
            $To = "$Num" . "@myboostmobile.com";
        }
        if($Car == "CentennialWireless")
        {
            $To = "$Num" . "@myblue.com";
        }
        if($Car == "EinsteinPCS")
        { 
            $To = "$Num" . "@einsteinmms.com";
        }
        if($Car == "Nextel")
        {   
            $To = "$Num" . "@messaging.nextel.com";
        }
        if($Car == "Sprint")
        { 
            $To1 = "$Num" . "@pm.sprint.com";
            $To2 = "$Num" . "@messaging.sprintpcs.com";
        }
        if($Car == "T-Mobile")
        { 
            $To = "$Num" . "@tmomail.net";
        }
        if($Car == "USCellular")
        { 
            $To = "$Num" . "@mms.uscc.net";
        }
        if($Car == "Verizon Wireless")
        {
            $To = "$Num" . "@vtext.com";
        }
        if($Car == "Virgin Mobile")
        {
            $To = "$Num" . "@vmobl.com";
        }
        if(isset($To))
        {
        if(!mail("$To","Thanks","Hello everyone from Joe B!","From: Joe Burnett"))
        {
            die("Error!");
        }
        }
        if(isset($To1))
        {
                    if(!mail("$To1","Thanks","Hello everyone from Joe B!","From: Joe Burnett") || !mail("$To2","Thanks","$Text_Message","From: Joe Burnett"))
                    {
                        die("Error cell");
                    }}
                   

         $Query = mysql_query("INSERT INTO subscribers (formsource,user,car,num)
                            VALUES ('Basic J','Joe','$Car','$Num')");
                   if(!$Query)
                   {
                       die(mysql_error());
                   }
        
        ?>

No error are produced, but $_POST and $_POST are empty. They are created, but when I send an email with them and also add them to my database they show up empty? But, why?

Member Avatar for diafol

Does a new entry appear in the DB ?

<select name="car" id="car">
    <option value="nothing">------------------------------</option>
    <option value="Alltel">Alltel</option>
    <option value="AT&T">AT&amp;T</option>
    <option value="BoostMobile">Boost Mobile</option>
    <option value="CentennialWireless">Centennial Wireless</option>
    <option value="EinsteinPCS">Einstein PCS</option>
    <option value="Nextel">Nextel</option>
    <option value="Sprint">Sprint</option>
    <option value="T-Mobile">T-Mobile</option>
    <option value="US Cellular">US Cellular</option>
    <option value="VerizonWireless">Verizon Wireless</option>
    <option value="VirginMobile">Virgin Mobile</option>
    <option value="AT&T">AT&amp;T</option>
</select>

Try that for starters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.