Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di Luis33
    Registrato dal
    May 2003
    Messaggi
    975

    Comportamento condizioni

    Ciao, qualcuno potrebbe spiegarmi perchè se nel seguente code se inserisco la parte in rosso, smette di funzionare o meglio restituisce una pagina web bianca?: :master:
    codice:
     .....
    
    else
    
    strsql = "SELECT email FROM tbl_login WHERE email='" &request("email")& "'"
    Set objRec = Server.CreateObject("ADODB.Recordset") 
    objRec.Open strsql, strconn, 3, 3 
    
    if not objRec.bof and not objRec.eof then 
    Response.write "attenzione utente già registrato con questa e-mail"
    
    Code = Value(20)
    response.write Code
    
    strsqls = "SELECT ID_Code FROM tbl_login WHERE ID_Code = " & Code & " "
    Set objRecs = Server.CreateObject("ADODB.Recordset") 
    objRecs.Open strsqls, strconn, 3, 3 
    
    if not objRecs.bof and not objRecs.eof then 
    response.write "attenzione utente già registrato con questo CODE"   
    
    else
    
    'costruisci password
    password = genera_pwd()
    
    end if
    end if
    ... Sono graditi codes, esempi pratici, suggerimenti, consigli e critiche...
    "Ai posteri l'ardua sentenza..."
    Tante grazie
    Saluti
    Luis 33

  2. #2
    Utente di HTML.it L'avatar di Luis33
    Registrato dal
    May 2003
    Messaggi
    975
    ho provato a lasciare del code rosso soltanto:
    codice:
    Code = getSalt
    response.write Code
    lo script riprende a funzionare ma non mi restitusce nessun code; questa è la funzione:
    codice:
    <%
    Function getSalt(intLen)
    
    	Dim strSalt
    	Dim intIndex, intRand
    
    	If Not IsNumeric(intLen) Then
    		getSalt = "00000000"
    		exit function
    	ElseIf CInt(intLen) <> CDbl(intLen) Or CInt(intLen) < 1 Then
    		getSalt = "00000000"
    		exit function
    	End If
    
    	Randomize
    
    	For intIndex = 1 to CInt(intLen)
    		intRand = CInt(Rnd * 1000) Mod 16
    		strSalt = strSalt & getDecHex(intRand)
    	Next
    	
    	getSalt = strSalt
    
    End Function
    
    %>
    ... Sono graditi codes, esempi pratici, suggerimenti, consigli e critiche...
    "Ai posteri l'ardua sentenza..."
    Tante grazie
    Saluti
    Luis 33

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.