Javascript / PHP (NOT AJAX) - Is there a way to cancel a message once it has been submitted and is moving?

advertisements

javascript / PHP (NOT AJAX) - is there a way to cancel a post once it has been submitted and is in motion?

  • So the user hits the post button - all is well and form is submitted PHP is ready to catch the details.
  • For whatever reason there is network congestion and the server does not respond.
  • I want to give the user a chance to post again after a time has passed.

IS there a way to cancel the actual POST once it has been sent?

IS there a way to actually detect - on the server side - that a post was received?

(In this case data is to be saved in the database)

I'm imagining the whole post procedure has a beginning and an end on the server side?

...

Or - Is there a way to know for sure that the post is going no where. It has failed and that's the end of it?


No, you can't abort it. There is nothing you can do about it.

IS there a way to actually detect - on the server side - that a post was received?

Yes! Check the $_POST variable