Voici mon code php ci-dessous, je voudrais recuperer la valeur selectionnée de la liste dans la variable $valeur. Merci d'avance.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Les outils du webmaster</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
<link rel="stylesheet" type="text/css" href="style/menu_css.css" />
<style type="text/css">
</style>
 
<SCRIPT language="JavaScript">
 
function message_affiche()
{ 
var val=document.form_msg.elements['type_msg'].options[document.form_msg.elements['type_msg'].selectedIndex].value;
 
}
</script>
 
</head>
 
<body>
<?php
$valeur=?
 
<select  name="type_msg" onchange=message_affiche()>  
<option value="0" selected>tous</option> 
<option value="1">non lus</option> 
<option value="2">effacés</option> 
</select> 
 
?>
 
</body>
</html>