I have one php file named sample.php
, which includes the following code:
$abc = new DOTNET("FirstDotNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxx", "FirstDotNet.Class1");
echo $abc->Connect();
echo $abc->PrintItem();
echo "<img src=\"image.png\" onclick=\"\" />";
What I want is:
Those actions must be on the same php
page, not with form posting or with the help of another php file.
Is this possible? How I can trigger the third row of code after the page is loaded?
PHP can't do this, not in one page. I would look into Javascript to control the visibility of the IMG object.
PHP runs the whole file and returns the results to the browser. It doesn't allow you to stop and interact from the browser.