Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Reach db in separate php file
#1

[eluser]predat0r[/eluser]
Hi all,

I have a Jquery ajax code that pass datas due POST to a php file. This file would be write the datas in the database. But it gets an error with Active Records "cannot use $this .."
How can I use AR db functions in this file? (Of course with normal php db connet and query code it works).

Thank you
#2

[eluser]vitoco[/eluser]
dumb question..why you use a "php file" and not a method inside a controller? is there an advantage ?
#3

[eluser]predat0r[/eluser]
[quote author="vitoco" date="1289615820"]dumb question..why you use a "php file" and not a method inside a controller? is there an advantage ?[/quote]

you're right! I brought this routine from a plane php source originally, but I modified to CI system, only I forgot to write about it in this forum Smile
Sorry ,and thanks anyway!




Theme © iAndrew 2016 - Forum software by © MyBB