Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Problema di sessione

  1. #1

    Problema di sessione

    Ciao a tutti
    Ho un problema

    Allora io devo inserire nel file search.php il file auth.php

    Praticamente sono file di software diversi e sto cercando di asesmblarmi per farmi un portalino freeware piu che altro come passatempo

    In pratica io per includere il file auth.php
    utilizzo il comando :
    Codice PHP:
    include("auth.php"); 
    all'inizio di search.php

    Il casino è che auth.php ha una sua sessione :

    Codice PHP:
    include("../config.php");

    // tell we want to work with sessions
    session_start();

    // the $HTTP_SESSION_VARS[id] in this query indicates that we want to retrieve the username from the session.
    $query "Select * from ".$DBprefix."signup where username='".@$HTTP_SESSION_VARS[id]."' And password = '".@$HTTP_SESSION_VARS[pass]."'";
    $result mysql_query($query); 
    che serve per autentificare gli utenti

    e anche il file search ha una sua sessione

    Codice PHP:
    session_name("crisoftricette");
    //session_start();
    require_once(dirname(__FILE__)."/lang/".$_SESSION['locale'].".php");
    require(
    dirname(__FILE__)."/crisoftlib.php");
    require(
    dirname(__FILE__)."/includes/db_connection.inc.php");
    $trans_sid cs_IsTransSid();
    cs_DestroyAdmin();
    cs_AddHeader();
    if (isset(
    $_SESSION['recipe_id']))
    {
        unset(
    $_SESSION['recipe_id']);
    }
    if (isset(
    $_SESSION['recipe_name']))
    {
        unset(
    $_SESSION['recipe_name']);
    }
    echo 
    "<h2>" MSG_SEARCH_TITLE "</h2>\n";

    if (isset(
    $_POST['action']))
    {
        if(empty(
    $_POST['search_text']))
        {
            echo 
    "<p class=\"error\">" ERROR_INPUT_REQUIRED "!\n";
            echo 
    "<form method=\"post\" action=\"search.php"; if ($trans_sid == 0) { echo "?" SID; } echo "\">\n"

    Come posso fare per farli convivere tra di loro ?

  2. #2
    nessuno mi aiuta ??

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.