I'm using and ajax call with multiple fields
and in process.phpCode:temp1='v1'; temp2='12'; temp3='Mary'; temp4='2'; temp5='A-'; temp6='unknown'; $.ajax({ type: 'POST', url: 'process.php', data: { version: temp1, sessionnumber: temp2, name: temp3, numofhours: temp4, testresult: temp5, gradepointaverage: temp6 }, success: function(_log) { $('#readout').append(_log); } });
I want to append to $('#readout') a whole new set of data calculated off what was just sent. Such as a gradepointaverage calculated off other scores in mysql for that $name plus a new issued sessionnumber.Code:$received = '<div>Data received for ' . $name .' '.$testresult. '</div>'; echo $received;
Would anyone know how to mod this code so I am sending back multiple fields?
Is it possible to originate an ajax call from the php end at a later point in time?



Reply With Quote





Bookmarks