Welcome Guest, Not a member yet? Register   Sign In
Return data from controller to another php file
#1

[eluser]Byrro[/eluser]
Hello,

I´m using TinyMCE wysiwyg text editor in my website, which has an image upload manager plugin. This plugin has its own session auth system, but I´m rewriting it to use the session handler from CI.

My goal is: the plugin´s auth system returns true/false if the user is logged. I already have an auth based on CI, using encrypted session, for all the CMS. The plugin´s auth system is outside CI and can´t access its classes. I´m trying to make it (image manager auth) call a controller method inside my CI (pointing an external URL). Inside this method, I´ll check for the user session and return true/false to the plugins´s auth system.

How can I send information from this controller method to an outside php file? Do you have any tips?

Thank you!
#2

[eluser]danmontgomery[/eluser]
You can't return values over an http request, they have to be output. This output is then usually passed as a parameter to a success function... If it's anything more complicated than a boolean or string value, you will generally want to use json_encode() to make your life easier.




Theme © iAndrew 2016 - Forum software by © MyBB