[Solved] Launch a php script without form


Why are you using onclick? onclick executes javascript code.

Just link to the file

<a href="https://stackoverflow.com/questions/12374789/myscript.php">Say Hello</a>

If you must use javascript, you have to redirect to that page using something like window.location

Here’s a tutorial on redirecting with javascript

solved Launch a php script without form