Variable from JavaScript to PHP
<p>Here is the code:</p>

<pre><code>    $('#sousmenu a').click (function (){
        startSlideshow(&lt;?php echo json_encode(glob("photos-" .$_GET["folder"]. "/*.jpg"));?&gt;);
        return false;
    });
</code></pre>

<p>The question is I like the HREF to change and get caught by PHP, now it doesn't do anything, but writing the <code>?folder=portraits</code> works.</p>

<p><a href="http://www.studioteknik.com/html2/photo-portfolio.php" rel="nofollow">Here is the page</a>.</p>

<p><em><strong></em> Simpler <em>*</em></strong>
Maybe I am not clear, it happens sometimes!</p>

<p>I want the link href to be send to this PHP function,</p>

<pre><code>&lt;?php echo json_encode(glob("photos-" .(i what the href link). "/*.jpg"));?&gt; 
</code></pre>

<p>so clicking on the link <code>animaux</code> will send <code>animaux</code> to the <code>glob()</code> PHP function and will get all the .jpg files in the <code>photos-animaux</code> folder.</p>

<p>Clicking on the portraits will send the photo-portraits, etc.</p>
