Jump to content

Changing Previously Echoed Information?


drath

Recommended Posts

This is more of a logic question, so I may reveal some stupidity here :).

 

Say for example that I already echoed data in a previous location in the PHP code. For speed reasons, I want to go back after I already echoed that information. Is there a good way to go back and edit that previously echoed information. I know of the InnerHTML property with JavaScript, but I am trying for a non-JavaScript solution, PHP is ultimately more reliable anyways.

 

Link to comment
https://forums.phpfreaks.com/topic/116075-changing-previously-echoed-information/
Share on other sites

ob_start only works before the data is sent to the browser.  If you're looking to have things change in "real time" as in, "123" is echoed in someone's browser and you're wanting some event to make it change to "456" in the browser, this is not possible with php alone, because php is parsed and executed on the server and then the results sent to the browser.  If you want a "real time" solution you're going to have to go with javascript or ajax.  Or just stick to clicking a link or form button and submitting and reprocessing/displaying as a whole with php.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.