Пример #1
0
<?
// Include the file for the specific functions on Courts
$CourtGroundType= array( "Dur","Gazon","Synthétique","Terre battue" );

require_once '../../../Models/Courts.php';
if(!empty($_POST))
{
    $data=$_POST;
    if (!isset($data["CourtAvailSat"])) {
    $data["CourtAvailSat"]="off";
      }
       if (!isset($data["CourtAvailSun"])) {
        $data["CourtAvailSun"]="off";
      }
    $Court= new CourtsModel();
    $Court->Insert($data);

}
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
          <h4>Ajouter un terrain</h4>
     
            <form  method="post">
                <select name="CourtGroundType" required>
                  <? foreach ($CourtGroundType as $Type):?> 
                        <option value="<? echo $Type; ?>"><? echo $Type;?></option>           
                <? endforeach;?>
                </select> 

                <input name="CourtAddress"   placeholder="Adresse du terrain" type="address" required/>
                <input name="CourtAddressN"  placeholder="Numéro" type="number" required/>