how do I stop cookies from being automatcally

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    how do I stop cookies from being automatcally

    I am storing user names and addresses in cookies so that they do not
    have to enter them in forms. But now if I try to send the form with
    new data, the data in cookies is always called when I press the submit
    button. The data that I have entered get deleted and the data in the
    cookies is submitted. This also happens in scripts where I am not even
    using cookies to set the forms. How do I solve this problem?


    Thank you
    John
  • Chung Leong

    #2
    Re: how do I stop cookies from being automatcally

    Unless you change the variable order, cookie variables will always overwrite
    GET and POST ones. Use different variable names for the cookie variables or
    change the variable order in php.ini to something like ECGPS.

    Uzytkownik "John" <johnmark@faste rmail.com> napisal w wiadomosci
    news:1ab390bb.0 403231742.21348 639@posting.goo gle.com...[color=blue]
    > I am storing user names and addresses in cookies so that they do not
    > have to enter them in forms. But now if I try to send the form with
    > new data, the data in cookies is always called when I press the submit
    > button. The data that I have entered get deleted and the data in the
    > cookies is submitted. This also happens in scripts where I am not even
    > using cookies to set the forms. How do I solve this problem?
    >
    >
    > Thank you
    > John[/color]


    Comment

    • Alvaro G Vicario

      #3
      Re: how do I stop cookies from being automatcally

      *** John wrote/escribió (23 Mar 2004 17:42:42 -0800):[color=blue]
      > I am storing user names and addresses in cookies so that they do not
      > have to enter them in forms. But now if I try to send the form with
      > new data, the data in cookies is always called when I press the submit
      > button. The data that I have entered get deleted and the data in the
      > cookies is submitted. This also happens in scripts where I am not even
      > using cookies to set the forms. How do I solve this problem?[/color]

      Are you sure it's a cookie issue? It sounds like browser's autocomplete
      feature. Cookies are never used to fill a form unless you explicitly do so.


      --
      --
      -- Álvaro G. Vicario - Burgos, Spain
      --

      Comment

      • Chris Hope

        #4
        Re: how do I stop cookies from being automatcally

        Chung Leong wrote:
        [color=blue]
        > Unless you change the variable order, cookie variables will always
        > overwrite GET and POST ones. Use different variable names for the cookie
        > variables or change the variable order in php.ini to something like ECGPS.[/color]

        Or don't use $foo; use $_POST['foo'], $_GET['foo'] and $_COOKIE['foo'] so
        you don't confuse them.

        Chris

        --
        Chris Hope
        The Electric Toolbox Ltd

        Comment

        Working...