[SOLVED] Reach db in separate php file - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [SOLVED] Reach db in separate php file (/showthread.php?tid=35824) |
[SOLVED] Reach db in separate php file - El Forum - 11-12-2010 [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 [SOLVED] Reach db in separate php file - El Forum - 11-12-2010 [eluser]vitoco[/eluser] dumb question..why you use a "php file" and not a method inside a controller? is there an advantage ? [SOLVED] Reach db in separate php file - El Forum - 11-13-2010 [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 Sorry ,and thanks anyway! |