# Wants to edit smarty template and try to store value into smarty variable.



## pkachhia (Jan 21, 2009)

Hi all,

I am working on smarty template based website.Here I want to store some value based on some database values on php page into smarty variable.And then use it on other smarty template page(.tpl).
But somehow it is not working.
I also tried to store values into session and then try to use it on template page but it not works.

Please help me out from this!!
I am stuck up on this problem from last 2 days.

Thanks in advance!! ray:

pkachhia


----------



## jamiemac2005 (Jul 5, 2007)

Hey we'd need your code to help you, please post it(in code tags, [the # button on the advanced editor]).

Cheers,
Jamey


----------



## pkachhia (Jan 21, 2009)

Thanx Jamey for the reply

below is my code of login.php page

//some database conversion (select query) and then check the data here
//below is the code where I have assign value to smarty variable

$smarty->assign("membership", "yes");	

func_header_location($redirect_to."/home.php", false); // redirects on home.php

//home.php page
func_display("customer/home.tpl",$smarty); //function for display smarty page

//from home.tpl page one home_login.tpl page is included, below is the code, where //i got the problem
//home_login.tpl page

{if $membership eq "yes"}

// display some text here

{/if}

on this page I did not got the value of $membership variable.

Hope this gives you an idea.

pkachhia


----------

