1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<form method="POST" action="" target="">
<!--<input type="text" name="congesdeb" class="date" value="Du" />
<input type="text" name="congesfin" class="date" value="Au" />-->
<input type="text" name="congesdeb" size="12" class="date" value="Du"/>
<input type="text" name="congesfin" size="12" class="date" value="Au"/>
<input type="submit" value="Ajouter" class="bouton"/>
<?
mysql_connect("localhost",USER,PASS);
mysql_select_db(BASE);
$congesdeb=$_POST['congesdeb'];
$congesfin=$_POST['congesfin'];
$t=explode("-",$congesdeb);
$t2=explode("-",$congesfin);
$date_bd = $t[2].'-'.$t[1].'-'.$t[0];
$date_bd2 = $t2[2].'-'.$t2[1].'-'.$t2[0];
$req='INSERT INTO conges (congesdeb,congesfin) VALUES ('.$congesdeb.','.$congesfin.')';
$result=mysql_query($req) or die (mysql_error());
echo $req
?>
</form> |