Results 1 to 3 of 3

Thread: session problem

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default session problem

    Error in session I think... because i try to write message, and got error:
    You cannot signup this guestbook at the moment! (its error ['e01']). How works this session and why i got this error???

    PHP Code:
       if ($settings['junkmark_use'])
            {
                
    $junk_mark=JunkMark($name,$from,$email,$url,$comments);

                if (
    $settings['junkmark_ban100'] && $junk_mark == 100) {
                    
    gbook_banIP(gbook_IP(),1);
                } elseif (
    $junk_mark >= $settings['junkmark_limit'])
                {
                    
    $_SESSION['block'] = 1;
                    
    problem($lang['e01'],0);
                }
            }

            
    addEntry($name,$from,$email,$url,$comments,$isprivate); 
    PHP Code:
    function check_mail_url()
    {
    global 
    $settings$lang;
    $v = array('email' => '','url' => '');
    $char = array('.','@');
    $repl = array('.','@');

    $v['email']=htmlspecialchars($_POST['email']);
    if (
    strlen($v['email']) > && !(preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$v['email']))) {$v['email']='INVALID';}
    $v['email']=str_replace($char,$repl,$v['email']);

    if (
    $settings['use_url'])
    {
        
    $v['url']=htmlspecialchars($_POST['url']);
        if (
    $v['url'] == 'http://' || $v['url'] == 'https://') {$v['url'] = '';}
        elseif (
    strlen($v['url']) > && !(preg_match("/(http(s)?:\/\/+[\w\-]+\.[\w\-]+)/i",$v['url']))) {$v['url'] = 'INVALID';}
    }
    elseif (!empty(
    $_POST['url']))
    {
        
    $_SESSION['block'] = 1;
        
    problem($lang['e01'],0);
    }
    else
    {
        
    $v['url'] = '';
    }

    return 
    $v
    there are only those two parts when session with that error [e01] are used. THANKS... write if you need more info.
    Last edited by auriaks; 08-08-2009 at 04:20 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    PHP Code:
    function check_mail_url() 

    global 
    $settings$lang
    $v = array('email' => '','url' => ''); 
    $char = array('.','@'); 
    $repl = array('.','@'); 

    $v['email']=htmlspecialchars($_POST['email']); 
    if (
    strlen($v['email']) > && !(preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$v['email']))) {$v['email']='INVALID';} 
    $v['email']=str_replace($char,$repl,$v['email']); 

    if (
    $settings['use_url']) 

        
    $v['url']=htmlspecialchars($_POST['url']); 
        if (
    $v['url'] == 'http://' || $v['url'] == 'https://') {$v['url'] = '';} 
        elseif (
    strlen($v['url']) > && !(preg_match("/(http(s)?:\/\/+[\w\-]+\.[\w\-]+)/i",$v['url']))) {$v['url'] = 'INVALID';} 

    elseif (!empty(
    $_POST['url'])) 

        
    session_start(); // here
        
    $_SESSION['block'] = 1
        
    problem($lang['e01'],0); 

    else 

        
    $v['url'] = ''


    return 
    $v
    I also fixed this for you:
    http://dynamicdrive.com/forums/showt...t=47416&page=2
    - Josh

  3. The Following User Says Thank You to JShor For This Useful Post:

    auriaks (08-08-2009)

  4. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    thank you... you are too GOOD to me

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
  •