You mix the languages ββon the server side and on the client side script. PHP runs on the server side (on the web server), javascript launches the client part (in the web browser). Onclick is javascript, so it works on the client side. You cannot call PHP functions directly from the Onclick action.
http://en.wikipedia.org/wiki/Client-side_scripting
http://en.wikipedia.org/wiki/Server-side
To achieve what you want, you do not need PHP scripting. All of this can be done in Javascript. You need to add an identifier to the form:
$arayuz.="<form name='form' id='myform' action='index.php' method='post'>";
Then, as an onclick action, use the following:
$arayuz.="<input type=checkbox name=All value=All onclick='document.getElementById(\"myform\").style.visibility = \"hidden\";'>"
source share