PHP Render/Redirect AJAX Call

MirX

New Member
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 \[code\]include my_page_..._ajax.php\[/code\], but I have always had problems with the file paths and PHP not knowing what to render. Not to mention, both of those files \[code\]include utilities.php\[/code\] and I'm afraid there might be conflicts. I guess I could use \[code\]include_once\[/code\] 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!
 
Back
Top