hi,
I have a webside i designed in php 4.3.4 and i have moved to to a machine running PHP Version 4.3.3, it is having major problems passing variables between scripts, can anybody tell me what changes i can expect when doing this move???? i know its a bad idea, but can anybody tell me how bad an idea it is?

many thanks

    having major problems passing variables between scripts

    what kind of problems? check to see if register_globals is turned on in php.ini

      hi, thanks for that, is it best to be on on off????

      many thanks

        ahhhh perfect, i kinda see wht u mean, i was turned on on my old server, but now its off, so i need to rewrite my code quickly, can u show me a quick example of how to pass variable between forms when this is turned off ??? i'd very much appriciate this cos i'm in a crazy hurry...........

        thanks

          for variables that are sent with GET (<form action="..." method="get")
          use

          $_GET['variable'] 
          //instead of 
          $variable
          

          for those with POST

          $_POST['variable'] 
          //instead of 
          $variable
          

          for cookies

          $_COOKIE['variable'] 
          //instead of 
          $variable
          

          or just tu be sure use

          $_REQUEST['variable'] 
          //instead of 
          $variable
          

          for any variable comming from outside your script(form, cookies)

            hi, I'm not clear on what you mean, on the sending script do i use

            $_COOKIE['dbid']  = "45";
            [code=php]
            
            and then in the script that recieves i can use
            
            [code=php]
            
            $_REQUEST['dbid']
            [code=php]
            and then  
            
            [code=php]
            echo $dbid;
            
            [code=php]
            should show 45?  
            
            
            am i correct ( prob not :(
              Write a Reply...