If possible, suggest several possible options. Learned one
onclick="window.location.href='1.php'"
If possible, suggest several possible options. Learned one
onclick="window.location.href='1.php'"
To execute php, there are only 2 ways - it is to open the url with code, whether it is a click on the link, or, as in your example, switch from js , or through $ .ajax , $ .post , $ .get , anyway, I must say the server that you want to run php and get the result. And the 2nd is to run a php script in a php console, which in fact does not have common sense. ))
Source: https://ru.stackoverflow.com/questions/141584/