Visualizzazione dei risultati da 1 a 4 su 4

Discussione: errore end?? ma dove?

  1. #1

    errore end?? ma dove?

    ciao a tutti, ho il seguente script (mypage.asp), che mi da errore:



    <%
    'Ottiene l'ID del prodotto
    productID = TRIM( Request( "pid" ) )
    'Ottiene le informazioni di accesso
    login = TRIM( Request( "login" ) )
    IF login <> "" THEN
    username = TRIM( Request( "username" ) )
    password = TRIM( Request( "password" ) )
    ELSE
    username = TRIM( Request( "newusername" ) )
    password = TRIM( Request( "newpassword" ) )
    END IF
    mypage = TRIM( Request( "mypage" ) )
    error = TRIM( Request( "error" ) )
    register = TRIM( Request( "register" ) )
    IF username = "" then
    username = request.cookies("username")
    password = request.cookies("password")
    End if
    'Apre la connessione al database
    Set Con = Server.CreateObject( "ADODB.Connection" )
    Con.Open "accessDSN"

    'Verifica il codice per l'aggiornamento
    IF mypage <> "" AND error = "" THEN
    updateUser
    END IF
    IF register <> "" AND error = "" THEN
    addUser
    END IF
    'Ottieni l'ID utente
    userID = checkpassword( username, password, Con )
    'Verifica se l'utente esiste nel db o se le informazioni non sono mai state passate
    IF userID > 0 THEN
    SET RS = Con.Execute("SELECT * FROM users WHERE user_ID = "&userid)
    'Inserisce valori stringa con le impostazioni esistenti
    newusername = RS("user_username")
    newpassword = RS("user_password")
    email = RS("user_email")
    street = RS("user_street")
    city = RS("user_city")
    state = RS("user_state")
    zip = RS("user_zip")
    cctype = RS("user_cctype")
    ccnumber = RS("user_ccnumber")
    ccexpires = RS("user_ccexpires")
    ccname = RS("user_ccname")
    %>
    <form method="post" action="<%=submitpage%>">
    <input name="mypage" type="hidden" value="1">
    <input name="pid" type="hidden" value="<%=productID%>">
    <font face="Arial" size="2">
    Change the values below and hit 'Update' to change your personal settings:
    </font>
    <font face="Arial" size="2" color="darkgreen">


    Login Information:
    </font>
    <font face="Courier" size="2">

    username:
    <input name="newusername" size=20 maxlength=20
    value="<%=newusername%>">

    password:
    <input name="newpassword" size=20 maxlength=20
    value="<%=newpassword%>">

    email address:
    <input name="email" size=30 maxlength=75
    value="<%=email%>">
    </font>
    <font face="Arial" size="2" color="darkgreen">


    Address Information:
    </font>
    <font face="Courier" size="2">

    street:
    <input name="street" size=20 maxlength=50
    value="<%=street%>">

    city:
    <input name="city" size=20 maxlength=50
    value="<%=city%>">

    state:
    <input name="state" size=20 maxlength=2
    value="<%=state%>">

    zip:
    <input name="zip" size=20 maxlength=20
    value="<%=zip%>">
    </font>
    <font face="Arial" size="2" color="darkgreen">


    Payment Information:
    </font>
    <font face="Courier" size="2">

    type of credit card:
    <select name="cctype">
    <option value="1"
    <%=SELECTED( cctype, "1" )%> > VISA
    <option value="2"
    <%=SELECTED( cctype, "2" )%> > MasterCard
    </select>

    credit card number:
    <input name="ccnumber" size=20 maxlength=20
    value="<%=ccnumber%>">

    credit card expires:
    <input name="ccexpires" size=20 maxlength=20
    value="<%=ccexpires%>">

    name on credit card:
    <input name="ccname" size=20 maxlength=20
    value="<%=ccname%>">


    <input type="submit" value="Update">
    </font>
    </form>

    L'errore e':

    Errore di compilazione di Microsoft VBScript (0x800A03F6)
    Previsto 'End'
    /pp/mypage.asp, line 107

    La riga 107 e' questa:
    value="<%=ccname%>">
    perche' mi dice che e' previsto un end, se io l'if non l'ho usato??

  2. #2
    e invece sì che l'hai usato. indenta (rientra) per bene il codice e lo vedrai da te

  3. #3
    optime, l'ho trovato. grazie per la risposta

  4. #4
    Originariamente inviato da fragolina-mx
    optime, l'ho trovato. grazie per la risposta
    optime!

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 © 2025 vBulletin Solutions, Inc. All rights reserved.