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 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<cfoutput>
<html>
<head>
<link rel="stylesheet" media="screen" type="text/css" title="coldfusion" href="coldfusion.css">
</head>
<body>
<form action="authentification3.cfm" method="POST">
<!--- ???: traitement --->
<cfquery datasource="authentification" name="authentification">
SELECT login FROM authentification
</cfquery>
<!--- ???: --->
<center><cfoutput><h2>Bonjour #authentification.login#</h2></cfoutput>
Quel personne voulez vous voir son emplois du temps :
<select name="choix" onChange="form1.submit()">
<!--- ???: attribute tjrs entre guillemets --->
<option value="-1">-- Choisissez -- </option>
<cfloop query="authentification">
<!--- ???: value est transmis au traitement --->
<option value="#login#">#login#</option>
</cfloop>
</select>
Comment lui dire que c'est dans choix que je veux récuperer les variables ???
<!--- ???: ne pas utiliser # pour rien --->
<cfif choix neq -1>
<!--- ???: query authentification est déjà utilisé, choisis un autre nom de query --->
<!--- ???: traitement à placer avant représentation --->
<cfquery datasource="authentification" name="...">
SELECT login FROM authentification
<!--- ???: je répète tjrs utiliser cfqueryparam sinon bonjour les SQL Injection --->
WHERE login = <cfqueryparam value="#choix#" CFSQLTYPE="[A toi de voir]">
</cfquery>
<cftable query="....">
</cftbale>
</cfif>
</body>
</html>
</cfoutput> |
Partager