Welcome Guest, Not a member yet? Register   Sign In
Using "PHP" inside front end scripts
#1

Hey everyone,

I have a question that I was able to only partially answer on my own. I have read and understood that it is not a best practice to mix back end and front end code, but I am still doing it and simply can not find better way. To be exact - I am using cached variables sent from controller to view in my jquery and javascript scripts.

I have implemented a one-question survey in the sidebar, so a real life example would be my survey controller that sends a $question, $array[answer => count] and $date to view. And then I use those variables in googles JSAPI pie chart to make a nice visualization.

Is this considered standard practice and it's only the functional back end code that should not mix in the front end scenery or am I missing something here?

Thank you for your time and best regards,

Rok
Reply


Messages In This Thread
Using "PHP" inside front end scripts - by kamenjan - 07-02-2015, 06:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB