php code which works in one server doesn't work on another server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shankari07
    New Member
    • Sep 2007
    • 16

    php code which works in one server doesn't work on another server

    hi guys ,
    i have developed a website which works fine in one server but not working in another server.
    the problem is i have a button which clears up the session variables that is not working properly.
    here is the code:
    [php]
    if(($clear == 'Clear'))
    {

    $_SESSION["data_info"] = "";
    $_SESSION["oper_info"] = "";
    $_SESSION["head_info"] ="";
    $_SESSION["tablename"] ="";

    $_SESSION["ndata_info "] = "";
    $_SESSION["noper_info "] = "";
    $_SESSION["nhead_info "] ="";
    $_SESSION["ntablename "] ="";
    $countFields = "";

    $_SESSION["app_cri"] ="";
    $_SESSION["ind_cri"] ="";
    $_SESSION["sub_cri"] ="";
    $_SESSION["mat_cri"] ="";
    $_SESSION["ctc_cri"] ="";
    $_SESSION["ywc_cri"] ="";
    $_SESSION["pla_cri"] ="";
    $_SESSION["sta_cri"] ="";
    $_SESSION["ass_cri"] ="";
    $_SESSION["org_cri"] ="";
    $_SESSION["date_cri"] ="";

    $_SESSION["oper_app"] ="";
    $_SESSION["oper_ind"] ="";
    $_SESSION["oper_sub"] ="";
    $_SESSION["oper_mat"] ="";
    $_SESSION["oper_ctc"] ="";
    $_SESSION["oper_ywc"] ="";
    $_SESSION["oper_pla"] ="";
    $_SESSION["oper_sta"] ="";
    $_SESSION["oper_date"] ="";
    $_SESSION["oper_ass"] ="";
    $_SESSION["oper_org"] ="";

    $_SESSION["data_app"] ="";
    $_SESSION["data_sub"] ="";
    $_SESSION["data_mat"] ="";
    $_SESSION["data_ind"] ="";
    $_SESSION["data_ctc"] ="";
    $_SESSION["data_ywc"] ="";
    $_SESSION["data_pla"] ="";
    $_SESSION["data_sta"] ="";
    $_SESSION["data_sele"] ="";
    $_SESSION["data_ass"] ="";
    $_SESSION["data_org"] ="";

    }

    <td align="center"> <input type="submit" name="clear" value="Clear" size="40" ?>">[/php]
    the server which works fine has the following version
    php 4.4.4
    mysql 4.1.22-standard
    apache 1.3.37

    the server which doesn't work has the following version
    php 4.4.8
    mysql 4.1.22-standard
    apache 2.0.63

    cud anyone help me
    Last edited by ronverdonk; Mar 24 '08, 10:31 AM. Reason: code tags!!
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    We can only help you when you adhere to the Posting Guidelines! Next time enclose your code within the appropriate code tags!

    moderator

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      Is your problem that your button does not work or that the $_SESSION variables are not cleared? If the button does not work, show the button processing code. And this time within code tags.

      Ronald

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        You posted pretty much the same question here

        What is $clear?

        Does as satas said in the other post - it seems you are relying on register_global s which isn't on.

        Regards.

        Comment

        • shankari07
          New Member
          • Sep 2007
          • 16

          #5
          Thank you very much Markus it really worked out.
          Originally posted by markusn00b
          You posted pretty much the same question here

          What is $clear?

          Does as satas said in the other post - it seems you are relying on register_global s which isn't on.

          Regards.

          Comment

          Working...