Welcome Guest, Not a member yet? Register   Sign In
Form Validation only Works When User is Logged In??
#1

[eluser]Tom Schlick[/eluser]
This one has been really puzzling me for the past couple of weeks. We have it setup so the user logs into thier account to manage all of their stuff and interact with our site. but we have noticed that the validation messages on the forms only show up when the user is logged in. same with the flashdata. this is a big problem because most of the validation is for the registration and login pages where the user is obviously not logged in...

here is some of the source code see if anyone can make any sense of this....
logout.php
Code:
<?php

class Logout extends Controller
{
    function _construct()
    {
        parent::Controller();
    }
    
    function index()
    {
        $this->user_library->logout();
        $this->session->set_flashdata('info', 'you have been logged out');
        redirect('login');
    }
}    
?>

then that redirects to login...

now we have a central file that has the notificaitons for flashdata... its called notice.tpl (since we are using smarty.) its included in every page and is this...

Code:
{{if $session->flashdata('good')}}

    <div class="notice_green">{{$session->flashdata('good")}}</div>
    

{{elseif $session->flashdata('error')}}

    <div class="notice_yellow">{{$session->flashdata('error")}}</div>
    

{{elseif $session->flashdata('bad')}}

    <div class="notice_red">{{$session->flashdata('bad")}}</div>
    

{{elseif $session->flashdata('info')}}

    <div class="notice_blue">{{$session->flashdata('info")}}</div>
    
{{/if}}

again it works if you are logged in... but not if you are not

if someone could help i would greatly greatly appriciate it... thanks


Messages In This Thread
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 09:44 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:09 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:14 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:26 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:28 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:33 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:59 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 01:22 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 01:50 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 01:52 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 02:13 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 02:36 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:07 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-03-2008, 11:16 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-04-2008, 08:10 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-04-2008, 12:40 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-04-2008, 01:51 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 07:42 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 08:04 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 08:22 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 09:02 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 09:08 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 09:39 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 09:56 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 10:19 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 10:21 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 10:22 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 12:31 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-05-2008, 01:29 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-06-2008, 10:53 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-06-2008, 12:12 PM
Form Validation only Works When User is Logged In?? - by El Forum - 09-11-2008, 12:23 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-12-2008, 07:16 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-12-2008, 07:29 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-12-2008, 08:43 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-12-2008, 08:45 AM
Form Validation only Works When User is Logged In?? - by El Forum - 09-12-2008, 08:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB