SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Cookies..

  1. #1
    SitePoint Addict
    Join Date
    May 2001
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok.. gurus.. please tell me whats wrong with this code?

    PHP Code:
    <?
    $logininfo 
    "$username*$password"
    if (!
    $help)) {
    setcookie('help',$logininfo,0,'/',0);

        if( !
    $username || !$password)
        {    
        echo (
    "Error - all the fields are required, please go back and fill them in.");
        }
    }
    elseif (
    $help) {
    $string explode("*",$supportdesk);
    $username $string[0];
    $password $string[1];
                      }
    ?>
    this code doesnt seem to be working

  2. #2
    SitePoint Guru
    Join Date
    Jan 2001
    Location
    Alkmaar, Netherlands
    Posts
    710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?
    $logininfo 
    "$username*$password"
    if (!
    $help)) {<-------- an extra paranthese
    setcookie
    ('help',$logininfo,0,'/',0);

        if( !
    $username || !$password)
        {    
        echo (
    "Error - all the fields are required, please go back and fill them in.");
        }
    }
    elseif (
    $help) {
    $string explode("*",$supportdesk);<-----you mean $help 
    $username 
    $string[0];
    $password $string[1];
                      }
    ?>
    and last 0 in setcookie is domain? check out http://www.php.net/manual/en/function.setcookie.php

  3. #3
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i always though the last zero was to show unsecure?
    i dunno...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •