Php and Javascript connection
<p>I'm very interested in if it is possible to connect javascript variables to php. I know that in php we can write javascript code, but on the contrary we could not. To express my aim better , lets bring example like that: </p>

<pre><code>&lt;form name="some" action="&lt;?php $_SERVER['php_self']; ?&gt;" method="post"&gt;
 &lt;input type="submit" name="but" value="Action"&gt;
&lt;/form&gt;
</code></pre>

<p>My question is how to make after pressing submit button to confirm (alert) with javascript and if it is confirmed do something (with php) and if isn't cancel (php operation).</p>
