Welcome Guest, Not a member yet? Register   Sign In
Problems with validation/flashdata
#1

[eluser]Tom Schlick[/eluser]
ok my application uses smarty for the design team to work with and we have a file called notice.tpl, now notice.tpl is called globally with everypage and put in its place whether it displays content or not. how it works is that it detects if there is flashdata with the name of: "good", "bad", "error", or "info" and if that data exists it displays the message inside of it. now we have realized that this only works if the user is logged in? i was thinking it was a session problem with a user having to have a session before it can create flashdata but im unsure.

this is also happening with the form validation. such as our register page a user must be logged in to see the validation messages.

here is the notice.tpl file
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}}

even if i try it in regular php code ... nothing

the parameters that we pass to see if a user is logged in are
Code:
$this->session->userdata('userID') this is a numeric string
$this->session->userdata('logged_in') Boolean
$this->session->userdata('username') string of the usernaem
if anyone can help i and my team would greatly appriciate it

P.S. {{ and }} are our delimeters for smarty
#2

[eluser]Tom Schlick[/eluser]
is anyone able to help with this please!!! Sad




Theme © iAndrew 2016 - Forum software by © MyBB