Any way to invoke a php script besides user clicking a button on a form?

  • Thread starter Thread starter Houyhnhnm
  • Start date Start date
H

Houyhnhnm

Guest
The only way I know to run a php script is to put the name of the script in a <form action=""> tag. Are there any other options?

I have a situation where I would like to start a php script without relying on the user to press a button. I tried putting php code in a .html file, but when I load the file from the server it doesn't execute any php.

Thanks,
Houyhnhnm
 
if you want the PHP code to execute as soon as the page is loaded, just rename the extension to .PHP and hyperlink the file as normal. It will execute when the page is rendered by the server and sent back to your browser.
 
if you want the PHP code to execute as soon as the page is loaded, just rename the extension to .PHP and hyperlink the file as normal. It will execute when the page is rendered by the server and sent back to your browser.
 
Back
Top