html - PHP 5.2 and Smarty, Scope issue -


i trying separate code functions make more readable.

i made function update field in database. trying when change username goes update account function updates session variable , smarty var,and database regarding name.

everything gets updated after form submitted smarty variable , can't figure out why(i know scope) because if declare out of function works fine.

all magic need fixed in home portion of routing section of code. thank :)

code :http://pastebin.com/vdrpz3hc


Comments