AJAX Post to self in PHP -


I think there is something that I should have learned so far, and I'm sure it's something small that I I am missing, but I can clearly use the explanation to ensure that my attitude is correct.

I am using AJAX to post the data to self which is a file that contains php and html. I can write PHP fine, but successful Ajax post After, how do I return only the data that is processed by PHP, not the remaining HTML? Is it better to just post on a different script?

If you have to handle the post request in POP, start the file, you can do something like this:

  & lt ;? Php if (isset ($ _ POST ['somevar'])) {/ * some * / exit (0); }? & Gt;   

exit () the page on that row will stop loading.

I think it is better to use a different script to deal with dynamic AJAX requests.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -