Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    problema aggiornamento con POST

    Salve a tutti, per imparare mi sono fatto una specie di mini forum su file di testo .php. I "method" dei form che ho usato erano POST ma ho dovuto ricambiarli in GET perché in caso di aggiornamento della pagina mi appariva una finestra di conferma con: "la pagina che si sta cercando di vedere contiene POSTDATA..."etc.
    In questo caso le informazioni da passare sono poche e posso usare il metodo GET ma esiste un sistema per non far comparire la finestra di conferma, utilizzando POST?
    Ringrazio chiunque abbia un'idea in proposito.

  2. #2
    nessuno?
    le sessioni?
    mi rispondo e faccio qualche prova!

  3. #3
    Non mi fungono le funzioni ho questi errori:
    Warning: Cannot send session cookie - headers already sent by (output started at c:\documents and settings\gio\documenti\siti

    dinamici\web\prove\sessioni\ss1.php:1) in c:\documents and settings\gio\documenti\siti dinamici\web\prove\sessioni\ss1.php on line 2

    Warning: Cannot send session cache limiter - headers already sent (output started at c:\documents and settings\gio\documenti\siti dinamici\web\prove\sessioni\ss1.php:1) in c:\documents and settings\gio\documenti\siti dinamici\web\prove\sessioni\ss1.php on line 2

    Warning: open(/tmp\sess_87e4c7bdd795d29f56f385f13f60eb78, O_RDWR) failed: No such file or directory (2) in c:\documents and settings\gio\documenti\siti dinamici\web\prove\sessioni\ss1.php on line 2

    Warning: open(/tmp\sess_87e4c7bdd795d29f56f385f13f60eb78, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

    Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)

    in Unknown on line 0



    php.ini sembra regolare



    [Session]
    session.save_handler = files ; handler used to store/retrieve data
    session.save_path ="C:\Programmi\EasyPHP\tmp\"; argument passed to save_handler
    ; in the case of files, this is the
    ; path where data files are stored
    session.use_cookies = 1 ; whether to use cookies
    session.name = PHPSESSID
    ; name of the session
    ; is used as cookie name
    session.auto_start = 0 ; initialize session on request startup
    session.cookie_lifetime = 0 ; lifetime in seconds of cookie
    ; or if 0, until browser is restarted
    session.cookie_path = / ; the path the cookie is valid for
    session.cookie_domain = ; the domain the cookie is valid for
    session.serialize_handler = php ; handler used to serialize data
    ; php is the standard serializer of PHP
    session.gc_probability = 1 ; percentual probability that the
    ; 'garbage collection' process is started
    ; on every session initialization
    session.gc_maxlifetime = 1440 ; after this number of seconds, stored
    ; data will be seen as 'garbage' and
    ; cleaned up by the gc process
    session.referer_check = ; check HTTP Referer to invalidate
    ; externally stored URLs containing ids
    session.entropy_length = 0 ; how many bytes to read from the file
    session.entropy_file = ; specified here to create the session id
    ; session.entropy_length = 16
    ; session.entropy_file = /dev/urandom
    session.cache_limiter = nocache ; set to {nocache,private,public} to
    ; determine HTTP caching aspects
    session.cache_expire = 180 ; document expires after n minutes
    session.use_trans_sid = 1 ; use transient sid support if enabled
    ; by compiling with --enable-trans-sid
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeent ry"



    FILE ss1.php

    <?php
    session_start();
    $num_impiegato =session_id();
    session_register("nome","dipartimento"); ?>

    <HTML>
    <BODY>
    <?php
    $form="<CENTER><H2>Consegne Spa - Nuovo Impiegato</H2></CENTER>
    <FORM ACTION=http://localhost/prove/sessioni/ss2.php\" METHOD=\"POST\">
    Nome impiegato:

    <INPUT TYPE=\"text\" NAME=\"nome\" SIZE=20>

    Dipartimento

    <SELECT NAME=\"dipartimento\" >
    <OPTION SELECTED>Autista consegne
    <OPTION>Magazzino
    <OPTION>Vendite
    <OPTION>Amministrazione
    </SELECT>


    <INPUT TYPE=\"submit\" VALUE=\"Pagina seguente\">
    <INPUT TYPE=\"reset\" VALUE=\"Cancella!\">
    </FORM>";
    ?>
    </BODY></HTML>
    <?php
    echo $form;
    ?>errori errori

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.