Visualizzazione dei risultati da 1 a 9 su 9
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804

    ottimo script per il login con un piccolissimo difetto

    salve scrivo tanto per scrivere tanto sicuramente nessuno risponde, comunque ho trovato uno script che è molto interessante, per il login, funziona semplicemente con le sessioni maledetto tema che non riesco a capire in nessun modo comunque lo script inserisce le sessioni nel database . adesso e datanto che volevo fare un lavoro del genere, per sicurezza comunque ho provato a mdificare lo script a i parametri chemiservon a me, e mi da sempre errore, cioe risuta sempre che i datiinseriti non sono corretti, io posto il codice magari qualcuno mi da una mano ne sarei grato

    aut.lib.php
    Codice PHP:



    $_AUTH 
    = array(
        
    "TRANSICTION METHOD" => AUTH_USE_COOKIE
    );

    function 
    auth_set_option($opt_name$opt_value){
        global 
    $_AUTH;
        
        
    $_AUTH[$opt_name] = $opt_value;
    }

    function 
    auth_get_option($opt_name){
        global 
    $_AUTH;
        
        return 
    is_null($_AUTH[$opt_name])
            ? 
    NULL
            
    $_AUTH[$opt_name];
    }

    function 
    auth_clean_expired(){
        global 
    $_CONFIG;
        
        
    $result mysql_query("SELECT creation_date FROM ".$_CONFIG['table_sessioni']." WHERE uid='".auth_get_uid()."'");
        if(
    $result){
            
    $data mysql_fetch_array($result);
            if(
    $data['creation_date']){
                if(
    $data['creation_date'] + $_CONFIG['expire'] <= time()){
                    switch(
    auth_get_option("TRANSICTION METHOD")){
                        case 
    AUTH_USE_COOKIE:
                            
    setcookie('uid');
                        break;
                        case 
    AUTH_USE_LINK:
                            global 
    $_GET;
                            
    $_GET['uid'] = NULL;
                        break;
                    }
                }
            }
        }
        
        
    mysql_query("
        DELETE FROM "
    .$_CONFIG['table_sessioni']."
        WHERE creation_date + "
    .$_CONFIG['expire']." <= ".time()
        );
    }

    function 
    auth_get_uid(){
        
        
    $uid NULL;

        switch(
    auth_get_option("TRANSICTION METHOD")){
            case 
    AUTH_USE_COOKIE:
                global 
    $_COOKIE;
                
    $uid $_COOKIE['uid'];
            break;
            case 
    AUTH_USE_LINK:
                global 
    $_GET;
                
    $uid $_GET['uid'];
            break;
        }

        return 
    $uid $uid NULL;
    }

    function 
    auth_get_status(){
        global 
    $_CONFIG;

        
    auth_clean_expired();
        
    $uid auth_get_uid();
        if(
    is_null($uid))
            return array(
    100NULL);
        
        
    $result mysql_query("SELECT U.name as name, U.surname as surname, U.username as username
        FROM "
    .$_CONFIG['table_sessioni']." S,".$_CONFIG['table_utenti']." U
        WHERE S.user_id = U.id and S.uid = '"
    .$uid."'");
        
        if(
    mysql_num_rows($result) != 1)
            return array(
    100NULL);
        else{
            
    $user_data mysql_fetch_assoc($result);
            return array(
    99array_merge($user_data, array('uid' => $uid)));
        }
    }

    function 
    auth_login($uname$passw){
        global 
    $_CONFIG;

        
    $result mysql_query("
        SELECT *
        FROM "
    .$_CONFIG['table_utenti']."
        WHERE username='"
    .$uname."' and password=MD5('".$passw."')"
        
    );
        
        if(
    mysql_num_rows($result) != 1){
            return array(
    AUTH_INVALID_PARAMSNULL);
        }else{
            
    $data mysql_fetch_array($result);
            return array(
    AUTH_LOGEDD_IN$data);
        }
    }

    function 
    auth_generate_uid(){

        list(
    $usec$sec) = explode(' 'microtime());
        
    mt_srand((float) $sec + ((float) $usec 100000));
        return 
    md5(uniqid(mt_rand(), true));
    }

    function 
    auth_register_session($udata){
        global 
    $_CONFIG;
        
        
    $uid auth_generate_uid();
        
        
    mysql_query("
        INSERT INTO "
    .$_CONFIG['table_sessioni']."
        (uid, user_id, creation_date)
        VALUES
        ('"
    .$uid."', '".$udata['id']."', ".time().")
        "
        
    );
        if(!
    mysql_insert_id()){
            return array(
    AUTH_LOGEDD_IN$uid);
        }else{
            return array(
    AUTH_FAILEDNULL);
        }
    }

    function 
    auth_logout(){
        global 
    $_CONFIG;

        
    $uid auth_get_uid();
        
        if(
    is_null($uid)){
            return 
    false;
        }else{
            
    mysql_query("
            DELETE FROM "
    .$_CONFIG['table_sessioni']."
            WHERE uid = '"
    .$uid."'"
            
    );
            return 
    true;
        }

    home.php



    Codice PHP:
    ist($status, $user) = auth_get_status();

    if($status == AUTH_LOGGED & auth_get_option("TRANSICTION METHOD") == AUTH_USE_LINK){
        $link = "?uid=".$_GET['uid'];
    }else    $link = '';
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Documento senza titolo</title>
    <link href="stili-css-admin-pannell/help-admin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function scambio(id){
         if (document.getElementById){
                if(document.getElementById(id).style.display == 'none'){
                      document.getElementById(id).style.display = 'block';
                } else {
                      document.getElementById(id).style.display = 'none';
                }
          }
    }
    -->
    </script>

    </head>

    <body>

    <div id="logotitle">:<?php //echo "[img]$path_site/admin/logo/$logosito[/img]"; ?></div>

    <script type="text/javascript" src="../script-javascript/ahahText.js"></script>
    <div id='result' class="risultato"></div>

    <?php
            
    switch($status){
                case 
    AUTH_LOGGED:
                
    ?>
            [b]Sei loggato con il nome di <?=$user["nome"];?> [url="logout.php<?=$link?>"]Logout[/url][/b]
                <?php
                
    break;
                case 
    AUTH_NOT_LOGGED:
                
    ?>
    <form name=""id='formName' method=""action="javascript:completeAHAH.likeSubmit('<? echo"inc/login.php";?>', 'POST', 'formName', 'result');" enctype='multipart/form-data'>
    <table id="bordologin">
        <tr>
          <td>

          <div class="ipadress"><?php echo"".date("j F Y   g:i:s a").""?></div>
          <div id="tableformlogin">
           <table id="formlogin">
            <tr>
             <td>[b]Login:[/b]</td><td><input type="text" name="uname"  class="inputformlogin"/></td>
              </tr>
               <tr>
             <td>[b]Password:[/b]</td><td><input type="password" name="passw" class="inputformlogin" /></td>
            </tr>
           <tr>
         <td></td><td><input type="submit" name="" value="accedi" class="yellowbutton" /></td>
       </tr>
      </table>
    </div>
    <div class="ipadress"><?php echo"".$_SERVER['REMOTE_ADDR'].""?></div>
          </td>
        </tr>
    </table>
    </form>
    <?php
                
    break;
            }

    e infine il login.php
    Codice PHP:
    include_once("config.php");
    include_once(
    "auth.lib.php");

    list(
    $status$user) = auth_get_status();

    if(
    $status == AUTH_NOT_LOGGED){
        
    $uname strtolower(trim($_POST['uname']));
        
    $passw strtolower(trim($_POST['passw']));

        if(
    $uname == "" or $passw == ""){
            
    $status AUTH_INVALID_PARAMS;
        }else{
            list(
    $status$user) = auth_login($uname$passw);
            if(!
    is_null($user)){
                list(
    $status$uid) = auth_register_session($user);
            }
        }
    }
    switch(
    $status){
    case 
    AUTH_LOGGED:
    header("Refresh: 5;URL=home.php");
    echo 
    '<div align="center">Sei gia connesso ... attendi il reindirizzamento</div>';
    break;
    case 
    AUTH_INVALID_PARAMS:
    header("Refresh: 5;URL=../login.php");
    echo 
    '<div align="center">Hai inserito dati non corretti ... attendi il reindirizzamento</div>';
    break;
    case 
    AUTH_LOGEDD_IN:
    switch(
    auth_get_option("TRANSICTION METHOD")){
    case 
    AUTH_USE_LINK:
    header("Refresh: 5;URL=home.php?uid=".$uid);
    break;
    case 
    AUTH_USE_COOKIE:
    header("Refresh: 5;URL=home.php");
    setcookie('uid'$uidtime()+3600*365);
    break;
    case 
    AUTH_USE_SESSION:
    header("Refresh: 5;URL=home.php");
    $_SESSION['uid'] = $uid;
    break;
    }
    echo 
    '<div align="center">Ciao '.$user['nome'].' ... attendi il reindirizzamento</div>';
    break;
    case 
    AUTH_FAILED:
    header("Refresh: 5;URL=home.php");
    echo 
    '<div align="center">Fallimento durante il tentativo di connessione ... attendi il reindirizzamento</div>';
        break;

    a dimenticavo il config.php nn si sa mai magari qual cuno decide di aiutarmi e poi non trova il config e cambia idea
    Codice PHP:
    $_CONFIG['host'] = "localhost";
    $_CONFIG['user'] = "root";
    $_CONFIG['pass'] = "maurizio";
    $_CONFIG['dbname'] = "prova";
    $_CONFIG['table_sessioni'] = "sessioni";
    $_CONFIG['table_utenti'] = "utenti";
    $_CONFIG['expire'] = 60;

    //--------------
    define('AUTH_LOGGED'99);
    define('AUTH_NOT_LOGGED'100);
    define('AUTH_USE_COOKIE'101);
    define('AUTH_USE_LINK'103);
    define('AUTH_INVALID_PARAMS'104);
    define('AUTH_LOGEDD_IN'105);
    define('AUTH_FAILED'106);
    $conn mysql_connect($_CONFIG['host'], $_CONFIG['user'], $_CONFIG['pass']) or die('Impossibile stabilire una connessione');
    mysql_select_db($_CONFIG['dbname']); 
    perdonate la mia ignioranza
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    grazie
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  3. #3
    Utente di HTML.it L'avatar di dottwatson
    Registrato dal
    Feb 2007
    Messaggi
    3,012
    ciao rocco

    in login.php vedi di scrivere sotto ogni riga che riporta

    list($status, $user)...ecc.. ecc..

    echo "$status
    ";
    echo "$user
    ";

    e vedi dove ti cambia lo stato .

    inoltre a me non sembra proprio che tu usi le sessioni ($_SESSION) ma i cookie ($_COOKIE) che sono un pò come le sessioni solo che il file non risiede sul server ma sul computer del visitatore.

    Non sempre essere l'ultimo è un male... almeno non devi guardarti le spalle

    il mio profilo su PHPClasses e il mio blog laboweb

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    grazie dotwatson sempre gentile
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    dottwatson tu dici che questo script che ho postato usa i cooke e non le sessioni?
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  6. #6
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    ho trovato questa classe per le sessioni ma non riesco ad farla funzionare co lo script che uso io
    Codice PHP:
    class Session {
        
    // session-lifetime
        
    public $lifeTime;
        function 
    __construct ($db) {
            
    // get session-lifetime
            
    $this->lifeTime get_cfg_var("session.gc_maxlifetime");
               
    // open database-connection
            
    $this->mdb2 =& MDB2::factory($db);
            if (
    PEAR::isError($this->mdb2)) {
                
    $php_errormsg .= $this->mdb2->getMessage();
                
    $php_errormsg .= $this->mdb2->getDebugInfo();
            }
            
    session_set_save_handler(array(&$this'open'),
                                    array(&
    $this'close'),
                                    array(&
    $this'read'),
                                    array(&
    $this'write'),
                                    array(&
    $this'destroy'),
                                    array(&
    $this'gc'));
            
    register_shutdown_function('session_write_close');
            
    session_start();
               return 
    true;
        }
        function 
    open($savePath$sessName) {
            
    // get session-lifetime
            
    $this->lifeTime get_cfg_var("session.gc_maxlifetime");
            return 
    true;
        }
        function 
    close() {
            
    $this->gc(ini_get('session.gc_maxlifetime'));
            
    // close database-connection
            
    return $this->mdb2->disconnect();
        }
        function 
    read($sessID) {
            global 
    $php_errormsg;
            
    // fetch session-data
            
    $query "
                SELECT session_data FROM sessions
                WHERE session = '
    $sessID'
                AND session_expires >
            "
    .time();
            
    $result $this->mdb2->queryOne($query);
            
    // return data or an empty string at failure
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
            }
            return 
    $result;
        }
        function 
    write($sessID,$sessData) {
            global 
    $php_errormsg;
            
    // new session-expire-time
            
    $newExp time() + $this->lifeTime;
            
    // is a session with this id in the database?
            
    $query "
                SELECT * FROM sessions
                WHERE session = '
    $sessID'
            "
    ;
            
    $result $this->mdb2->query($query);
            
    // if yes,
              
    if($result->numRows()) {
                
    // ...update session-data
                
    $query "
                    UPDATE sessions
                    SET session_expires = '
    $newExp',
                     session_data = '
    $sessData'
                    WHERE session = '
    $sessID'
                "
    ;
              }
            
    // if no session-data was found,
              
    else {
                
    // create a new row
                
    $query "
                    INSERT INTO sessions (
                         session,
                          session_expires,
                          session_data)
                    VALUES(
                         '
    $sessID',
                          '
    $newExp',
                          '
    $sessData')
                "
    ;
              }
            
    $result $this->mdb2->exec($query);
            
    // if something happened, return true
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
            } else {
                
    // ...else return true
                
    return true;
            }
        }
        function 
    destroy($sessID) {
            global 
    $php_errormsg;
            
    // delete session-data
            
    $query "
                DELETE FROM sessions
                WHERE session = '
    $sessID'
            "
    ;
            
    $result $this->mdb2->exec($query);
            
    // if session was not deleted, return false,
             
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
             } else {
                
    // ...else return true
                
    return true;
            }
        }
        function 
    gc($sessMaxLifeTime) {
            global 
    $php_errormsg;
            
    // delete old sessions
            
    $query "
                DELETE FROM sessions
                WHERE session_expires <
            "
    .time();
            
    $result $this->mdb2->exec($query);
            
    // return affected rows
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
            }
            return 
    $result;
        }

    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  7. #7
    Ciao,

    non ricevi risposta perché scrivi in modo poco comprensibile, oltre che di tanto in tanto ignorando il regolamento del forum.

    Non scrivendo in modo comprensibile, l'utente normale legge le prime righe e poi chiude: non ha voglia di doversi studiare, oltre ai problemi descritti nel thread anche, la lingua con la quale è stato scritto il testo del messaggio!!!

    Detto questo non puoi mettere insieme codice diverso se non comprendi bene su quali principi lavorano e se non sai programmare in maniera decente, perché altrimenti avrai solamente problemi!

    Ora vediamo se troviamo una soluzione ad i tuoi problemi.

    *** CODICE DEL PRIMO THREAD

    Beh direi innanzi tutto che il primo file si chiama auth.lib.php e non aut.lib.php, altrimenti il file login.php non trova il file. Detto questo il file home.php non include i file config.php e auth.lib.php, o per lo meno non ci sono queste inclusioni nel codice che hai postato. Dopo di che, dato che hai postato tutta sta roba, posta anche il codice SQL da utilizzare per creare il database, altrimenti questo codice non funzionerà ne ora ne mai dando l'errore che ricevi tu.

    Nell'attesa che posti il codice SQL, conviene che converti il codice
    Codice PHP:
    $uname strtolower(trim($_POST['uname']));
    $passw strtolower(trim($_POST['passw'])); 
    del file login.php

    in

    Codice PHP:
    $uname trim($_POST['uname']);
    $passw trim($_POST['passw']); 
    altrimenti se si inserisce nel database un nome utente o una password con caratteri in maiuscolo non funziona più nulla.

    Le sessioni sono solamente una struttura concettuale che può essere implementata in vari modi come ad esempio su database, tramite le funzionalità già presenti di php, salvando le informazioni su file ed in altri modi ancora. La modalità consigliata, per motivi di sicurezza e performance, è quella su database.

    *** CODICE DELLA CLASSE Session

    Quello che ti consiglio io è di "spezzare" la discussione su thread appositi, ovvero essendo questo un problema ben diverso dal primo, quello esposto nel primo post, riceverà maggiore attenzione.

    Il codice della classe Session sembra funzionare correttamente, ho fatto qualche prova veloce ed a me va. Che tipo di problemi hai nell'integrazione del codice?

    Considera che se la vuoi usare insieme al codice del primo thread puoi lasciare perdere direttamente perché dovresti riscrivere quasi interamente il codice del file auth.lib.php.
    The fastest Redis alternative ... cachegrand! https://github.com/danielealbano/cachegrand

  8. #8
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    ciao daniele e grazie anche a te, volevo usare la classe che ho postato per salvare le sessioni nel database, io momentaneamente uso uno script che usa i cooke , e nn so come modificarlo , ti posto lo script che uso io premeto che queso e lo script attualmente utilizzato da me,, che vorrei modificare



    , come primo io ad ogni pagina includo il files check1.php che sarebbe queso
    Codice PHP:
    include "config.php";
    include 
    "funzioni.php";
    $DB = new DB();
    $DB->connect();
    session_start();
    $parti explode("@@",$_COOKIE[login]);
    $nick_utente_cookie =  $parti[0];
    $password_utente_cookie $parti[1];
    $verifico_user1 mysql_query("SELECT *
    FROM `utenti`
    WHERE `email` ='
    $nick_utente_cookie'
    AND `pass` =  '
    $password_utente_cookie'
    LIMIT 0 , 1"
    );
    $ok mysql_num_rows($verifico_user1);
    $_SESSION['autorizzato'] = $ok;
    $autorizzato $_SESSION['autorizzato'];
    $_SESSION['nome_utente']= $nick_utente_cookie;
    $nome_utente $_SESSION['nome_utente'];
    $verifico_admin mysql_query("SELECT *
    FROM `amministrator`
    WHERE `email` ='
    $nick_utente_cookie'
    AND `pass` =  '
    $password_utente_cookie'
    LIMIT 0 , 1"
    );
    $ok mysql_num_rows($verifico_user1);
    $_SESSION['autorizzato'] = $ok;
    $autorizzato $_SESSION['autorizzato'];
    $_SESSION['nome_utente']= $nick_utente_cookie;
    $nome_utente $_SESSION['nome_utente']; 
    e questo e il files set.php
    Codice PHP:

    session_start
    ();
    if(
    $_SESSION[login]!='' or $_SESSION[psw]!=''){
    $cook "$_SESSION[login]@@$_SESSION[psw]";
    setcookie ("login"$cook);
    header("Location: index.php");
    }
    else
    {
    header("Location: login.php");


    volevo usare questo script per salvare le sessioni nel database anzi che uae i cooke , ed usare questa classe
    Codice PHP:


    class Session {
        
    // session-lifetime
        
    public $lifeTime;
        function 
    __construct ($db) {
            
    // get session-lifetime
            
    $this->lifeTime get_cfg_var("session.gc_maxlifetime");
               
    // open database-connection
            
    $this->mdb2 =& MDB2::factory($db);
            if (
    PEAR::isError($this->mdb2)) {
                
    $php_errormsg .= $this->mdb2->getMessage();
                
    $php_errormsg .= $this->mdb2->getDebugInfo();
            }
            
    session_set_save_handler(array(&$this'open'),
                                    array(&
    $this'close'),
                                    array(&
    $this'read'),
                                    array(&
    $this'write'),
                                    array(&
    $this'destroy'),
                                    array(&
    $this'gc'));
            
    register_shutdown_function('session_write_close');
            
    session_start();
               return 
    true;
        }
        function 
    open($savePath$sessName) {
            
    // get session-lifetime
            
    $this->lifeTime get_cfg_var("session.gc_maxlifetime");
            return 
    true;
        }
        function 
    close() {
            
    $this->gc(ini_get('session.gc_maxlifetime'));
            
    // close database-connection
            
    return $this->mdb2->disconnect();
        }
        function 
    read($sessID) {
            global 
    $php_errormsg;
            
    // fetch session-data
            
    $query "
                SELECT session_data FROM sessions
                WHERE session = '
    $sessID'
                AND session_expires >
            "
    .time();
            
    $result $this->mdb2->queryOne($query);
            
    // return data or an empty string at failure
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
            }
            return 
    $result;
        }
        function 
    write($sessID,$sessData) {
            global 
    $php_errormsg;
            
    // new session-expire-time
            
    $newExp time() + $this->lifeTime;
            
    // is a session with this id in the database?
            
    $query "
                SELECT * FROM sessions
                WHERE session = '
    $sessID'
            "
    ;
            
    $result $this->mdb2->query($query);
            
    // if yes,
              
    if($result->numRows()) {
                
    // ...update session-data
                
    $query "
                    UPDATE sessions
                    SET session_expires = '
    $newExp',
                     session_data = '
    $sessData'
                    WHERE session = '
    $sessID'
                "
    ;
              }
            
    // if no session-data was found,
              
    else {
                
    // create a new row
                
    $query "
                    INSERT INTO sessions (
                         session,
                          session_expires,
                          session_data)
                    VALUES(
                         '
    $sessID',
                          '
    $newExp',
                          '
    $sessData')
                "
    ;
              }
            
    $result $this->mdb2->exec($query);
            
    // if something happened, return true
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
            } else {
                
    // ...else return true
                
    return true;
            }
        }
        function 
    destroy($sessID) {
            global 
    $php_errormsg;
            
    // delete session-data
            
    $query "
                DELETE FROM sessions
                WHERE session = '
    $sessID'
            "
    ;
            
    $result $this->mdb2->exec($query);
            
    // if session was not deleted, return false,
             
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
                return 
    false;
             } else {
                
    // ...else return true
                
    return true;
            }
        }
        function 
    gc($sessMaxLifeTime) {
            global 
    $php_errormsg;
            
    // delete old sessions
            
    $query "
                DELETE FROM sessions
                WHERE session_expires <
            "
    .time();
            
    $result $this->mdb2->exec($query);
            
    // return affected rows
            
    if (MDB2::isError($result)) {
                
    $php_errormsg .= $result->getMessage();
                
    $php_errormsg .= $result->getDebugInfo ();
            }
            return 
    $result;
        }

    pero maledizzione non riesco a capire il concetto delle sessioni ,dimenticavo questo e il db
    CREATE TABLE `staff` (
    `id` int(11) NOT NULL auto_increment,
    `nome` varchar(150) NOT NULL,
    `cognome` varchar(150) NOT NULL,
    `telefono` varchar(100) NOT NULL,
    `nick` varchar(150) NOT NULL,
    `email` varchar(150) NOT NULL,
    `pass` varchar(100) NOT NULL,
    `stato` int(11) NOT NULL default '1',
    `caso` int(11) NOT NULL,
    `tipo` int(11) NOT NULL,
    `group` int(11) NOT NULL,
    `data` varchar(30) NOT NULL,
    `date_ultima_mod` varchar(30) default NULL,
    `ip` varchar(30) NOT NULL,
    `agent` varchar(150) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `email` (`email`)
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  9. #9
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    ragazzi mi date una mano??? per favore
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

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.