Mets tes balises html en minuscules,
et pour les régions, regarde de ce coté la : http://chez-syl.fr/2012/02/jquery-rempl ... tre-liste/
<?php
if(isset($_POST['Deposit_form']) && !empty($_POST['Deposit_form'])){
extract($_POST);
$Valid = true;
// Traitement
if($Type != "P" && $Type != "R"){
// On vérifie si le type est recherche ou proposition
$Valid = false;
$Notification = array('Class'=>'Error','Content'=>'Vous devez choisir le type de recherche.');
}
if(empty($Category)){
// On vérifie si la catégorie a été choisie.
$Valid = false;
$Notification = array('Class'=>'Error','Content'=>'Vous devez choisir la catégorie.');
}
/* Verification régions */
// http://chez-syl.fr/2012/02/jquery-remplir-une-liste-deroulante-selon-une-autre-liste/
if(strlen($PostalCode) > 5){
// vérification du nombre de characteres.
$Valid = false;
$Notification = array('Class'=>'Error','Content'=>'Le code postal est trop long.');
}
if(!is_numeric($tel)){
$Valid = false;
$Notification = array('Class'=>'Error','Content'=>'Le telephone est invalide.');
}
if($Valid){
// Connexion db;
// Insertion db;
$Notification = array('Class'=>'Success','Content'=>'Formulaire correct.');
}// end valid
} // end post
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulaire de Dépôt</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<style>
.spacer-15{height : 15px;}
.spacer-20{height : 20px;}
.spacer-25{height : 25px;}
.title{font-weight:bold;font-size:24px;}
.b{ font-weight:bold;}
.Selectbg{background-color:#dcdcc3;}
.Error{background-color:#966;color:#900;}
.Success{background-color:#9F9;color:#090;}
</style>
<script language="JavaScript">
<!-- script select regions -->
</script>
</head>
<body>
<div class="spacer-15"></div>
<?php if(isset($Notification)){ ?>
<div class="<?php echo $Notification['Class'];?>"><?php echo $Notification['Content'];?></div>
<div class="spacer-15"></div>
<?php } ?>
<form name="Deposit_form" action="formulaire.php" method="post">
<table border="5" align="center" cellpadding="1" cellspacing="4" class="table_n">
<tr>
<td align="center" bgcolor="#009900"><div><span class="title">Déposez votre annonce...</span>
<span class="b">Vous proposez, vous recherchez ?*</span>
<select name="Type" class="eingabe">
<option value="" class="Selectbg" disabled="disabled" selected="selected">Sélectionnez</option>
<option value="P" <?php if(isset($Type)&&$Type == "P") echo 'selected="selected"';?>>je propose</option>
<option value="R" <?php if(isset($Type)&&$Type == "R") echo 'selected="selected"';?>>je recherche</option>
</select></div>
</td >
</tr>
</table>
<div class="spacer-25"></div>
<table align="center">
<tr>
<td align="center">
<span class="b">Quelle catégorie*</span>
<select name="Category" class="cat">
<option value="" class="Selectbg" disabled="disabled"<?php if(!isset($Category)) echo 'selected="selected"';?>>Choix de la catégorie</option>
<option value="Cardio" <?php if(isset($Category)&&$Category == "Cardio") echo 'selected="selected"';?>>Cardiologie</option>
<option value="Pneumo" <?php if(isset($Category)&&$Category == "Pneumo") echo 'selected="selected"';?>>Pneumologie</option>
<option value="Derma" <?php if(isset($Category)&&$Category == "Derma") echo 'selected="selected"';?>>Dermatologie</option>
<option value="Hema" <?php if(isset($Category)&&$Category == "Hema") echo 'selected="selected"';?>>Hématologie</option>
</select>
</td>
</tr>
</table>
<div class="spacer-25"></div>
<table align="center">
<tr>
<td align="center">
<span class="b">Région*</span>
<select id="regions" name="regions" >
<option value="" class="Selectbg">-- Régions --</option>
<option value="Alsace">Alsace</option>
<option value="Aquitaine">Aquitaine</option>
<option value="Bourgogne">Bourgogne</option>
<option value="Bretagne">Bretagne</option>
<option value="Centre">Centre</option>
<option value="Champagne Ardenne">Champagne Ardenne</option>
</select>
<span class="b">Département*</span>
<select id="departements" name="departements">
<option value="">-- Départements--</option>
</select>
<span class="b">Code Postal</span> <em>(facultatif)</em> <input type="text" name="PostalCode" size="7" placeholder="ex : 75000" value="<?php if(isset($PostalCode)) echo $PostalCode;?>" />
</td>
</tr>
</table>
<div class="spacer-25"></div>
<table border="2" align="center" cellpadding="3" cellspacing="3">
<tr>
<td align="center"><span class="b">Titre de l'article*</span></td>
<td><input type="text" name="Article_title" size="65" value="<?php if(isset($Article_title)) echo $Article_title;?>" required="required" /></td>
</tr>
<tr>
<td align="center"><span class="b">Descriptif de l'article*</span></td>
<td><textarea name="Detail" rows="5" cols="50" required="required"><?php if(isset($Detail)) echo $Detail;?></textarea></td>
</tr>
</table>
<div class="spacer-25"></div>
<table border="2"align="center">
<tr>
<td align="center" style="border-right:none;" rowspan="2"><span class="b">Vous êtes*:</span></td>
<td style="border-left:none;"><input type="radio" name="Statut" value="Pro" <?php if(isset($Statut)&&$Statut == "Pro") echo 'selected="selected"';?> />un professionnel<br />
<input type="radio" name="Statut" value="Part" <?php if(isset($Statut)&&$Statut == "Part") echo 'selected="selected"';?> /> un particulier</td>
</tr>
</table>
<div class="spacer-25"></div>
<table border="2" align="center" cellpadding="4" cellspacing="3">
<tr>
<td><span class="b">Nom*</span> <em>(ou pseudo)</em> <input type="text" name="pseudo" size="15" required="required" value="<?php if(isset($pseudo)) echo $pseudo;?>" />
<span class="b">Email*</span>
<input type="email" name="mail"size="35" required="required" value="<?php if(isset($mail)) echo $mail;?>"/>
<span class="b">Tel</span> <em>(facultatif, visible si entré )</em>
<input type="tel" name="tel" size="11" value="<?php if(isset($tel)) echo $tel;?>"/>
</td>
</tr>
</table>
<div class="spacer-25"></div>
<table border="5" align="center" cellpadding="1" cellspacing="4">
<tr>
<td align="center" bgcolor="#009900"><input type="submit" name="Deposit_form" value="Envoyer">
<input type="reset" name="reset" value="Effacer" /></td>
</tr>
</table>
</form>
</body>
</html>