Hi there
I have a page that has php code at the top. Ajax before the body tag and a form.
I need to be able to call a php function (the one at the top of my page) that adds info from the form into the DB. Normally I'd do this in the traditional sense of "if($_REQUEST('submit')" but I have a jquery progress bar that works with ajax to request progress data from the server. The following code is the code that retrieves the data from the server:
if (@$_GET['id']) {
echo json_encode(uploadprogress_get_info($_GET['id']));
exit();
}
This as you can see executes repeatedly till the upload is finished. The problem is I can't incorporate my database insertion code with this because the progress bar stops working altogether.
If you know how to call a php function with ajax could you please supply an example or link. I'd really appreciate it.