PHP Popup Window

Posted on 2009-05-22
Medium Priority
Last Modified: 2013-11-19
I am debugging a PHP shopping cart written by a third party, using echo statements. In some case I want to echo a value before the shopping cart (Smarty based) outputs the header. Of-course, my echo is wiped out by the subsequent header statement. One thought I had was to use a popup window but of-course any javascript I output to open another window is also wiped out because it precedes the header statement. My only solution to date has been to put a die(""); statement after the echo but that is obviously sub-optimal. Suggestions?
Question by:esc_toe_account
  • 2
  • 2

Expert Comment

ID: 24453463
if I understand you correctly, you want to stop the execution of script after echo. Then use exit; to stop the execution.

Author Comment

ID: 24453532
No, I don't want to stop the script execution - I just want to see the value output by my echo statements, which I assume is being clobberred by the subsequent header. (The echo works fine if my echo statement is placed after the header is sent).

Accepted Solution

syedasimmeesaq earned 500 total points
ID: 24453638
you wont be able to display  it before the header cause the echo statement will be followed by the header and it wouldnt give browser much of a time to display it.
so may be you want to use delay or something after echo and but before headers are sent

Author Closing Comment

ID: 31584477
Ok, 'no' is an answer I half suspected. I am using Eclipse and Zend debugger so have switched to viewing the values in the debugger.

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Over time, the online landscape has altered considerably, but that’s nothing compared to the up-and-coming trends that will shape the web design industry in the coming year. Keep reading to find out which trends will shape B2B web design in 2018.
AngularJS web development a very simple procedure. So, to put it, in short, AngularJS’ stand out features are – Two-way data binding, MVC structure, directives, templates, dependency injections and testing.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question