Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 25

Discussione: flash asp e Access

  1. #1

    flash asp e Access

    Ciao a tutti,
    ho un problema con un form di registrazione...
    Uso Flash 8.
    Non so cosa succede ma il form non funziona.
    premetto che il mio sito è su hosting Aruba, e che come potete vedere sulla home page ho gia usato un form che si basa su asp e access e funziona perfettamente.
    Ho provato molte varianti diverse (ti percorsi del database e del .asp)
    percui credo che il problema sia nella costruzione generale...
    qualcuno mi puo aiutare...

    Visto che non vi posso allegare i file sorgente, asp e access se potete darli un'occhiata ve li invio via mail.

    Ho creato dei campi input e gli ho dato i nomi come variabili

    poi ho crato un bottone submit a cui ho dato il seguente ordine:

    on(press){
    loadVariablesNum("http://nobraingroup.com/processForm.asp",0,"post");
    }

    poi ho creato una pagina asp con questo codice:

    <%@language = "VBScript" %>
    <%

    strFirst = Request.Form("fname")
    strLast = Request.Form("lname")
    strEmail = Request.Form("email")
    strAddress = Request.Form("address")
    strZip = Request.Form("zip")
    strCountry = Request.Form("country")
    strPhone = Request.Form("phone")

    MyPath=Server.MapPath("example.mdb")
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
    "DBQ=" & MyPath

    SQL = "INSERT INTO contacts (FirstName, LastName, Email, Address, Zip, Country, Phone) VALUES ('"&strFirst&"','"&strLast&"','"&strEmail&"','"& st rAddress&"','"&strZip&"','"&strCountry&"','"&strPh one&"')"
    conn.Execute(SQL)
    %>

    ed infine un database access di nome example e con cartella contacts e con le colonne
    FirstName(testo), LastName(testo), Email (testo), Address (testo), Zip (numerico), Country(testo), Phone (numerico),

    ma quando salvo publico metto tutto sul server e provo ad utilizzarlo riempiendo i campi e premendo su submit non succede nulla. e non salvo nulla sul database.
    dove ho sbagliato??
    mi potete aiutare?
    grazie

  2. #2
    Replica la form in una pagina HTML con gli stessi campi e nomi dei campi e con method="post" e quindi prova a vedere cosa appare quando fai il submit.

    PS.
    Per vedere l'errore ASP devi andare in Opzioni avanzate di Explorer e togliere la spunta da Mostra messaggi di errore HTTP brevi.

  3. #3
    dici di escludere il file flash e fare la pagina in html?

  4. #4
    Originariamente inviato da Clemi
    dici di escludere il file flash e fare la pagina in html?
    E' solo per fare un test, per vedere cosa risponde la pagina ASP dopo avergli passato i dati via form.
    Dalla FORM in FLASH non puoi vedere il response che da la pagina ASP. Capisci?

  5. #5
    ho fatto quello che mi hai detto ed ho messo questa stringa è giusta?

    <form action="http://nobraingroup.com/processForm.asp" method="post" enctype="multipart/form-data">

  6. #6
    Senza questa:
    enctype="multipart/form-data"

  7. #7
    mi rimanda su
    http://www.nobraingroup.com

    se vuoi provare puoi andare su http://www.nobraingroup.com/generalcontact.htm

    cosa vuol dire?

    come percorso asp ho dovuto mettere
    MyPath=Server.MapPath("mdb-database/example.mdb")

    perche l'unica cartella scrivibile di aruba è quella

  8. #8
    Allora: posta qui il codice della pagina HTML con la form e quella ASP che dovrebbe salvare i dati.

  9. #9
    giusto per farti capire, questo è il codice HTML:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>General Contact Form</title>
    <style type="text/css">
    body {margin: 0; padding: 20px;}
    td {font-size: 11px; color:#ffffff; font-weight: bold; font-family:Verdana, Arial, Helvetica, sans-serif;}
    .style1 {font-size: 16px; color: #000000; font-weight: bold; font-family:Verdana, Arial, Helvetica, sans-serif;}
    </style></head><body>
    <table width="450" border="0" align="center" cellpadding="20" cellspacing="0">
    <tr>
    <td bgcolor="#9bace0">
    <p class="style1">General Contact Form </p>





    <form action="http://nobraingroup.com/processForm.asp" method="post">





    <table width="100%" border="0" cellpadding="5" cellspacing="1">
    <tr>
    <td width="15"></td>
    <td></td>
    <td ></td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>Name:</td>
    <td ><input name="fname" type="text" id="fname">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>LastName:</td>
    <td ><input name="lname" type="text" id="lname" value="">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>Email:</td>
    <td ><input name="email" type="text" id="email" value="">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>Phone:</td>
    <td ><input name="phone" type="text" id="phone" value="">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>address:</td>
    <td ><input name="address" type="text" id="address" value="">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>Zip:</td>
    <td ><input name="zip" type="text" id="zip">
    </td>
    </tr>
    <tr>
    <td width="15"></td>
    <td>country:</td>
    <td ><input name="country" type="text" id="country"></td>
    </tr>
    </table>
    <table width="100%" border="0" cellpadding="5" cellspacing="1">
    <tr>
    <td width="15"></td>
    <td></td>
    </tr>
    <tr>
    <td width="15" ></td>
    <td ></td>
    </tr>
    <tr align="right">
    <td width="15"></td>
    <td><input type="submit" value="Submit"> </td>
    </tr>
    </table>
    </form></td>
    </tr>
    </table>

    </body>
    </html>

  10. #10
    quello asp è:

    <%@language = "VBScript" %>
    <%

    strFirst = Request.Form("fname")
    strLast = Request.Form("lname")
    strEmail = Request.Form("email")
    strAddress = Request.Form("address")
    strZip = Request.Form("zip")
    strCountry = Request.Form("country")
    strPhone = Request.Form("phone")

    MyPath=Server.MapPath("mdb-database/example.mdb")
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
    "DBQ=" & MyPath

    SQL = "INSERT INTO contacts (FirstName, LastName, Email, Address, Zip, Country, Phone) VALUES ('"&strFirst&"','"&strLast&"','"&strEmail&"','"&st rAddress&"','"&strZip&"','"&strCountry&"','"&strPh one&"')"
    conn.Execute(SQL)
    %>

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.