Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Problema non da poco!!

  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2003
    residenza
    Prato
    Messaggi
    687

    Problema non da poco!!

    E' possibile far beccare ad un database da una tabella i dati che sono collegati ad un'altra tabella?

    Questo è il codice, mi trova i dati dell'utente principale mentre io vorrei trovare i dati dell'utente che si trova sotto di lui. La tabella collegata ad utenti si chiama utenti_secondari


    <html>
    <head>
    <link rel="stylesheet" href="../css/link.css" type="text/css">
    <title>.:: Vecchi Giochi Nuovi - Area Utenti - Dati Personali ::.</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }

    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    //-->
    </script>
    </head>

    <body>

    <% us = Request.Cookies("entra")("username")
    ps = Request.Cookies("entra")("password")
    Set db = Server.CreateObject("ADODB.Connection")
    db.Open "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("/fpdb/registrazione.mdb")
    query="SELECT * FROM utenti WHERE username = '" & us & "' AND parola_chiave = '" & ps & "'"

    Set rs = db.Execute(query)

    while not rs.EOF
    nome= rs("nome")
    cognome= rs("cognome")
    rs.movenext
    wend%>

    <div align="center">
    <center>
    <center>

    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 1px solid #008000; " bordercolor="#111111" width="100%" id="AutoNumber4" height="392">
    <tr>
    <td width="32%" height="43" align="left" style="border-right: 1px solid #008000">
    <p style="margin-left: 5; margin-right:5">Nome:</td>
    <td width="68%" height="43"><p style="margin-left: 5; margin-right:5">[b]<font size="2" color="#000000"><%=nome%></font></td>
    </tr>
    <tr>
    <td width="32%" height="43" align="left" style="border-top:1px solid #008000; border-bottom:1px solid #008000; " background="../immagini/erba_sfondo1.jpg">
    <p style="margin-left: 5; margin-right:5">Cognome:</td>
    <td width="68%" height="43" background="../immagini/erba_sfondo1.jpg" style="border-top: 1px solid #008000; border-bottom: 1px solid #008000"><p style="margin-left: 5; margin-right:5">
    <font size="2"><%=cognome%></font>
    </td>
    </tr>
    <tr>
    <td width="32%" height="43" align="left" style="border-right: 1px solid #008000">
    <p style="margin-left: 5; margin-right:5">Via:</td>
    <td width="68%" height="43"><p style="margin-left: 5; margin-right:5"><font size="2" color="#000000"></font></td>
    </tr>
    <tr>
    <td width="32%" height="43" align="left" style="border-top:1px solid #008000; border-bottom:1px solid #008000; " background="../immagini/erba_sfondo1.jpg">
    <p style="margin-left: 5; margin-right:5">Telefono:</td>
    <td width="68%" height="43" background="../immagini/erba_sfondo1.jpg" style="border-top: 1px solid #008000; border-bottom: 1px solid #008000"><p style="margin-left: 5; margin-right:5">
    <font size="2"></font></td>
    </tr>
    <tr>
    <td width="32%" height="44" align="left" style="border-right: 1px solid #008000">
    <p style="margin-left: 5; margin-right:5">Città:</td>
    <td width="68%" height="44"><p style="margin-left: 5; margin-right:5"><font size="2" color="#000000"></font></td>
    </tr>
    <tr>
    <td width="32%" height="44" align="left" style="border-top:1px solid #008000; border-bottom:1px solid #008000; " background="../immagini/erba_sfondo1.jpg">
    <p style="margin-left: 5; margin-right:5">Provincia:</td>
    <td width="68%" height="44" background="../immagini/erba_sfondo1.jpg" style="border-top: 1px solid #008000; border-bottom: 1px solid #008000"><p style="margin-left: 5; margin-right:5">
    <font size="2"></font>
    </td>
    </tr>
    <tr>
    <td width="32%" height="44" align="left" style="border-right: 1px solid #008000">
    <p style="margin-left: 5; margin-right:5">E-mail:</td>
    <td width="68%" height="44"><p style="margin-left: 5; margin-right:5"><font size="2" color="#000000"></font></td>
    </tr>
    <tr>
    <td width="32%" height="44" align="left" style="border-top:1px solid #008000; border-bottom:1px solid #008000; " background="../immagini/erba_sfondo1.jpg">
    <p style="margin-left: 5; margin-right: 5">
    Username:</td>
    <td width="68%" height="44" background="../immagini/erba_sfondo1.jpg" style="border-top: 1px solid #008000; border-bottom: 1px solid #008000">
    <p style="margin-left: 5; margin-right: 5"><font size="2"></font></td>
    </tr>
    <tr>
    <td width="32%" height="44" align="left" style="border-right: 1px solid #008000">
    <p style="margin-left: 5; margin-right: 5">Password:</td>
    <td width="68%" height="44">
    <p style="margin-left: 5; margin-right: 5"><font size="2" color="#000000"></font></td>
    </tr>
    </table>

    </center>

    </div>


    </body>

    </html>

  2. #2
    Moderatore di Altri Server + Database L'avatar di SUPERMIKY
    Registrato dal
    Jun 2001
    Messaggi
    1,706
    OT :rollo:
    vCard | CV | Social networks
    No, in privato non ti aiuto.

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.