Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6152043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:51:23+00:00 2026-05-23T19:51:23+00:00

I asked that question about PHP breaking. I need stop execution of php process

  • 0

I asked that question about PHP breaking.
I need stop execution of php process thread, while javascript performs get variable value operation (the code is generating by php).

Example:

<?php

print get("prompt('put your name here');"); 

// this will generate  $.ajax( ... data: { 'return':prompt('put your name') } ... ) 


?>

the PHP function ”get” must print javascript code (return headers and content), but don’t stop execution of php. He must watching a result of function from browser. (via ajax return).

How i can stop php execution with TEMPORARY output and returning query result after php code complete.
Or… advice me any solution of this problem.

(I need get prompt dialog result synchronously)

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:51:24+00:00Added an answer on May 23, 2026 at 7:51 pm

    This isn’t the way it works – you need to handle the output to/of the JavaScript and the response via Ajax as two separate requests within PHP.

    i.e.: The general scheme is as follows:

    1. PHP outputs the relevant HTML containing JavaScript, etc. The execution of this PHP script ends at this point.

    2. The client-side JavaScript carries out the required processing and makes an AJAX call to a PHP script on the server. This can be the same PHP script (you could switch on a provided page “mode” via a $_GET or $_POST variable) or it could be a different PHP page entirely. However, it’s important to realise that from PHP’s perspective it’s a completely different script invocation.

    The key thing to remember is that HTTP is inherently stateless, so you need to ensure that you pass all of the relevant information the PHP script requires in the AJAX request.

    Additionally, you should ideally ensure that there’s a fallback system in place for user’s that have JavaScript disabled, although that’s falling by the wayside to a certain extent these days.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked a question about that the action.class.php is getting very huge. There were
I recently asked a question about tracing Linq-to-Entities I think that one of the
I asked a similar question about this previously, but I did not specify that
I recently asked a question about IIf vs. If and found out that there
I recently asked a question about functional programming, and received (good!) answers that prompted
I asked a question here about an Linq error that results from mixing Linq-To-SQL
While looking at a micro-optimization question that I asked yesterday ( here ), I
This question has been asked about PHP both here and here , and I
I asked a question about C-type sizes which I get a pretty good answer
I saw this question asked about C# I would like an answer for PHP.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.