Как удалить эту автоматическую точку на php?

Я столкнулся с проблемой piculiar на моем скрипте регистрации сайта. В поле даты рождения, например (1987-1-1), он автоматически добавляет точку (.) В мой SQL на phpMyadmin, как (1987-.01-.01) [N. B- только поле "месяц и дата" содержит эта точка]

Моя форма Action-

$rform .= "<form action="\" regagree.php\""="" method="\" post\""=""><code>";</code> <p> Я использую этот код в форме</p> <pre class="prettyprint linenums">$rform .= "E-Mail *";
$rform .= "Birth Date *";
 $rform .= "<select name="\" day\""="" value="\" 01\""="">";
 $rform .= "<option value="\" 01\""="">1</option>";
 $rform .= "<option value="\" 02\""="">2</option>";
 $rform .= "<option value="\" 03\""="">3</option>";
 $rform .= "<option value="\" 04\""="">4</option>";
 $rform .= "<option value="\" 05\""="">5</option>";
 $rform .= "<option value="\" 06\""="">6</option>";
 $rform .= "<option value="\" 07\""="">7</option>";
 $rform .= "<option value="\" 08\""="">8</option>";
 $rform .= "<option value="\" 09\""="">9</option>";
 $rform .= "<option value="\" 10\""="">10</option>";
 $rform .= "<option value="\" 11\""="">11</option>";
 $rform .= "<option value="\" 12\""="">12</option>";
 $rform .= "<option value="\" 13\""="">13</option>";
 $rform .= "<option value="\" 14\""="">14</option>";
 $rform .= "<option value="\" 15\""="">15</option>";
 $rform .= "<option value="\" 16\""="">16</option>";
 $rform .= "<option value="\" 17\""="">17</option>";
 $rform .= "<option value="\" 18\""="">18</option>";
 $rform .= "<option value="\" 19\""="">19</option>";
 $rform .= "<option value="\" 20\""="">20</option>";
 $rform .= "<option value="\" 21\""="">21</option>";
 $rform .= "<option value="\" 22\""="">22</option>";
 $rform .= "<option value="\" 23\""="">23</option>";
 $rform .= "<option value="\" 24\""="">24</option>";
 $rform .= "<option value="\" 25\""="">25</option>";
 $rform .= "<option value="\" 26\""="">26</option>";
 $rform .= "<option value="\" 27\""="">27</option>";
 $rform .= "<option value="\" 28\""="">28</option>";
 $rform .= "<option value="\" 29\""="">29</option>";
 $rform .= "<option value="\" 30\""="">30</option>";
 $rform .= "<option value="\" 31\""="">31</option>";
 $rform .= "</select>";
 $rform .= "<select name="\" month\""="" value="\" 01-\""="">";
 $rform .= "<option value="\" 01-\""="">Jan</option>";
 $rform .= "<option value="\" 02-\""="">Feb</option>";
 $rform .= "<option value="\" 03-\""="">Mar</option>";
 $rform .= "<option value="\" 04-\""="">Apr</option>";
 $rform .= "<option value="\" 05-\""="">May</option>";
 $rform .= "<option value="\" 06-\""="">Jun</option>";
 $rform .= "<option value="\" 07-\""="">Jul</option>";
 $rform .= "<option value="\" 08-\""="">Aug</option>";
 $rform .= "<option value="\" 09-\""="">Sep</option>";
 $rform .= "<option value="\" 10-\""="">Oct</option>";
 $rform .= "<option value="\" 11-\""="">Nov</option>";
 $rform .= "<option value="\" 12-\""="">Dec</option>";
 $rform .= "</select>";
 $rform .= "<select name="\" year\""="" value="\" 1999-\""="">";
 $rform .= "<option value="\" 1999-\""="">99</option>";
 $rform .= "<option value="\" 1998-\""="">98</option>";
 $rform .= "<option value="\" 1997-\""="">97</option>";
 $rform .= "<option value="\" 1996-\""="">96</option>";
 $rform .= "<option value="\" 1995-\""="">95</option>";
 $rform .= "<option value="\" 1994-\""="">94</option>";
 $rform .= "<option value="\" 1993-\""="">93</option>";
 $rform .= "<option value="\" 1992-\""="">92</option>";
 $rform .= "<option value="\" 1991-\""="">91</option>";
 $rform .= "<option value="\" 1990-\""="">90</option>";
 $rform .= "<option value="\" 1989-\""="">89</option>";
 $rform .= "<option value="\" 1988-\""="">88</option>";
 $rform .= "<option value="\" 1987-\""="">87</option>";
 $rform .= "<option value="\" 1986-\""="">86</option>";
 $rform .= "<option value="\" 1985-\""="">85</option>";
 $rform .= "<option value="\" 1984-\""="">84</option>";
 $rform .= "<option value="\" 1983-\""="">83</option>";
 $rform .= "<option value="\" 1982-\""="">82</option>";
 $rform .= "<option value="\" 1981-\""="">81</option>";
 $rform .= "<option value="\" 1980-\""="">80</option>";
 $rform .= "<option value="\" 1979-\""="">79</option>";
 $rform .= "<option value="\" 1978-\""="">78</option>";
 $rform .= "<option value="\" 1977-\""="">77</option>";
 $rform .= "<option value="\" 1976-\""="">76</option>";
 $rform .= "<option value="\" 1975-\""="">75</option>";
 $rform .= "<option value="\" 1974-\""="">74</option>";
 $rform .= "<option value="\" 1973-\""="">73</option>";
 $rform .= "<option value="\" 1972-\""="">72</option>";
 $rform .= "<option value="\" 1971-\""="">71</option>";
 $rform .= "<option value="\" 1970-\""="">70</option>";
 $rform .= "<option value="\" 1979-\""="">79</option>";
 $rform .= "<option value="\" 1978-\""="">78</option>";
 $rform .= "<option value="\" 1977-\""="">77</option>";
 $rform .= "<option value="\" 1976-\""="">76</option>";
 $rform .= "<option value="\" 1975-\""="">75</option>";
 $rform .= "<option value="\" 1974-\""="">74</option>";
 $rform .= "<option value="\" 1973-\""="">73</option>";
 $rform .= "<option value="\" 1972-\""="">72</option>";
 $rform .= "<option value="\" 1971-\""="">71</option>";
 $rform .= "<option value="\" 1970-\""="">70</option>";
 $rform .= "<option value="\" 1969-\""="">69</option>";
 $rform .= "<option value="\" 1968-\""="">68</option>";
 $rform .= "<option value="\" 1967-\""="">67</option>";
 $rform .= "<option value="\" 1966-\""="">66</option>";
 $rform .= "</select>";

При необходимости он отправит regagree.php (пожалуйста, спросите)

Хотя я проверил несколько раз, но не могу понять, где проблема.

Здесь находится regagree.php

<!--?php
include("inc/func.inc.php");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo "<?xml version=\"1.0\"?-->\n";
echo "\n";
?>

<!--?php

 if(!db()){
 echo "<head-->";
 echo "<title>BdTEENS - Desi wap community !</title>";
 include("inc/css.inc.php");
 echo "";
 echo "";
 echo getdberror();
 echo "";
 echo "";
 exit();
 }
 $uid = $_POST["uid"];
 $pwd = $_POST["pwd"];
 $state = $_POST["state"];
 $status = $_POST["status"];
 $cpw = $_POST["cpw"];
 $usx = $_POST['usx'];
 $day = $_POST['day'];
 $loc = $_POST['loc'];
 $month = $_POST['month'];
 $year = $_POST['year'];
 $info = $_POST['info'];
 $email = $_POST["email"];
 $refer = $_POST["refer"];
 $captcha = $_POST["captcha"];
 $ubr = $_SERVER['HTTP_USER_AGENT'];
 $uip = getip();
 $nomon = $_SERVER['HTTP_X_FH_MSISDN'];
 $nomtw = $_SERVER['HTTP_MSISDN'];
 $nomtr = $_SERVER['HTTP_X_UP_CALLING_LINE_ID'];
 $nomon2 = $HTTP_X_FH_MSISDN;
 $nomtw2 = $HTTP_MSISDN;
 $nomtr2 = $HTTP_X_UP_CALLING_LINE_ID;

 if($nomon != "")
 {
 $numberp = $nomon;
 }else if($nomtw != "")
 {
 $numberp = $nomtw;

 }else if($nomtr != "")
 {
 $numberp = $nomtr;

 }else if($nomon2 != "")
 {
 $numberp = $nomon2;

 }else if($nomtw2 != "")
 {
 $numberp = $nomtw2;

 }else if($nomtr2 != "")
 {
 $numberp = $nomtr2;
 }


 echo "";
 echo "<title>BdTEENS - Desi wap community !</title>";
 include("inc/css.inc.php");
 echo "";
 echo "";
 echo "<div box_cen\""="">";
 echo "<b>Registration</b>";

 if(!canreg())
{
 echo "<div box_sub\""="" center\""="">";
 echo "Sorry.. Registration currently closed. Please try later.";
}else{
 $tolog = false;
 if(trim($uid)=="")
 {
 echo registerform(1);
 }else if(trim($pwd)=="")
 {
 echo registerform(2);
 }else if(trim($cpw)=="")
 {
 echo registerform(3);
}else if((regchars($uid))||(nospace($uid))||(checknumber($uid)))
{
 echo registerform(4);
}else if((regchars($pwd))||(nospace($pwd)))
{
 echo registerform(5);
}else if($pwd!=$cpw)
{
 echo registerform(6);
}else if(strlen($uid)<4)
{
 echo registerform(7);
}else if(strlen($pwd)<4)
{
 echo registerform(8);

}else if(nameexist($uid)==true)
{
 echo registerform(9);

}else if(trim($email)=="")
{
 echo registerform(10);
}else if(checkemail($email)==false)
{
 echo registerform(11);
}else if(emailexist($email)==true)
{
 echo registerform(12);
}else if($captcha!=$_SESSION["captcha_code"])
{
 echo registerform(13);
}else if(register($uid, $pwd, $usx, $day, $month, $year, $loc, $email, $info, $state, $status, $refer, $ubr, $uip, $numberp)==1)
{
 echo registerform(14);
}else if(register($uid, $pwd, $usx, $day, $month, $year, $loc, $email, $info, $state, $status, $refer, $ubr, $uip, $numberp)==2)
{
 echo registerform(14);
}else{
 echo "<div box_sub\""="" left\""="">";
 echo "<center>Registration Completed Successfully!</center>";
 echo "<i><b>Username:</b> $uid</i>";
 echo "<i><b>Password:</b> *****</i>";
 echo "<i><b>E-Mail:</b> $email</i>";
 $tolog = true;
}
}

if($tolog)
{
 $pmtext = "Thank You For Joining Us At BdTEENS, This Your Registration Detail. \n\n Username: $uid \n Password: $pwd";
 $from_head = "From: admin@BdTEENS";
 $subject = "BdTEENS Sign-Up Detail";
 $time = time();
 $ddt = date("M d y", $time);
 $content = "Date: $ddt \n\n $pmtext \n\n BdTEENS The Best Wap Community! \n\n HTTP://BdTEENS";
 mail($email, $subject, $content, $from_head);
 echo "<a href="\" login.php?loguid="$uid&logpwd=$pwd\" ""="" target="_blank">";
 echo "Login Now</a>";
echo "</div>";
 echo "</div>";
echo footerweb($hits);
}else{
 echo "</div>";
echo footerweb($hits);
}
echo "";
?>

Здесь register.php

<!--?php
include("inc/func.inc.php");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo "<?xml version=\"1.0\"?-->\n";
echo "\n";
?>

<!--?php
 if(!db()){
 echo "<head-->";
 echo "<title>BdTEENS - Desi wap community !</title>";
 include("inc/css.inc.php");
 echo "";
 echo "";
 echo getdberror();
 echo "";
 echo "";
 exit();
 }

 echo "";
 echo "<title>BdTEENS - Desi wap community !</title>";
 include("inc/css.inc.php");
 echo "";
 echo "";
 echo "<div box_cen\""="" center\""="">";
 echo "<b>Registration</b>";

if(!canreg())
{
 echo "<div box_sub\""="" center\""="">";
 echo "Sorry.. Registration currently closed. Please try later.";
 echo "</div>";
 echo "</div>";
 echo footerweb($hits);
}else{
 echo "<div box_sub\""="" left\""="">";
 echo "<b>Confirmation Registrations</b>";
 echo "<b>*</b> Allowed characters in username and password are a-z, A-Z, 0-9, and -_ only";
 echo "<b>*</b> No vulgar words are accepted in username";
 echo "<b>*</b> Username must contain at least 4 characters";
 echo "<b>*</b> Please insert the real e-mail to easy you get your missing password";
 echo "<b>*</b> If your browser can't view the security question, try to refreshing sites and try again";
 echo "<b>*</b> Your id was deleted automatic if not active in 3 months";
 echo "<b>*</b> Your must follow our rules before join this wap";
 echo "";
 echo "<center><a href="\" regagree.php\""="" target="_blank">I Agree</a> / <a href="\" index.php\""="" target="_blank">I Disagree</a></center></div>";
 echo "";
echo footerweb($hits);
 }
 echo "";
?>
2 ответа

в regagree.php добавьте эту строку и попробуйте

echo $_POST['year'] . $_POST['month'] . $_POST['day'];


Вы можете использовать строковые функции:

$date = '(1987-.01-.01)';

str_replace('.', '' , $date);

licensed under cc by-sa 3.0 with attribution.