Hello all,
I am working on a PHP application and missing some of the functionality that Rails has. I currently have an AJAX form that when submitted accesses my_page_save_ajax.php. After I process the form and save it, I would like to redirect the AJAX call to either my_page_show_ajax.php if successful or back to my_page_edit_ajax.php if an error occurred.
I have thought about using an include my_page_..._ajax.php
, but I have always had problems with the file paths and PHP not knowing what to render. Not to mention, both of those files include utilities.php
and I'm afraid there might be conflicts. I guess I could use include_once
but it seems like there might be a more elegant solution.
How can I process the form and return the output of another PHP page?
Thanks very much!