Problème sur un script de login
Bonjour,
J'essais de compléter un script via un formulaire à 2 questions pour un login. Le login fonctionne sans aucun problème mais je voudrais ajouter un script qui mentionne à l'usager (le cas échéant) "votre code et/ou combinaison est invalide"
Code:
1 2 3 4 5 6
|
<td><br /><input type="submit" name="Submit" value="Submit" onClick="JavaScript:MM_Submit()"></td>
</tr>
</form><%if Session("isError") = 1 then%>Invalid Dealer Rep combination<%else %><%end if%>
</table> |
et l'autre portion sur une autre page qui passe via un include :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Sub CheckLoginCookie
Session("isError") = 0
txtDealer=Request.Cookies("DealerCookie")
txtRep=Request.Cookies("RepCookie")
if ucase(left(txtDealer,7)) = "EXPIRES" then txtDealer = "" End if
if ucase(left(txtRep,7)) = "EXPIRES" then txtRep = "" End if
If ((Len(txtDealer) >= 4 AND Len(txtDealer) <= 6 AND isNumeric(txtDealer)) AND ((Len(txtRep) >= 3 and Len(txtRep) <= 4)) And isAlphaNumeric(txtRep)) Then
Session("Authenticated") = 1
Session("isError") = 0
else
Session("Authenticated") = 0
if (Len(txtDealer) > 0 or Len(txtRep) > 0) then
Session("isError") = 1
end if
end if
if (Request.QueryString("Print") = "1" or Request.Form("Print")) then Session("Authenticated") = 1
end sub |
Dois-je ajouter du code quelque part ou sur une autre page ?
La fonction d'erreur ne fonctionne pas
Merci de bien vouloir m'aider !8O