Language selection using images in PHP
<p>I have found an open source PHP script that uses a select menu to choose the language.</p>

<p>In the code session makes use of a loop to fill in the select menu, as above...</p>

<pre><code>$la = 0;
foreach($trans['languages'] as $short=&gt;$langname)  {
$params['LANGSEL'][$la]['LANG_SHORT'] = $short;
$params['LANGSEL'][$la]['LANG_LONG'] = $langname;
$la++;
}
</code></pre>

<p>In the php template creates the select menu like that...</p>

<pre><code>&lt;td&gt;&lt;select class="select" name="lang"&gt;&lt;#FOR LANGSEL#&gt;
&lt;option value="&lt;#LANG_SHORT#&gt;"&gt;&lt;#LANG_LONG#&gt;&lt;/option&gt;
&lt;#/FOR LANGSEL#&gt;&lt;/select&gt;&lt;/td&gt;
</code></pre>

<p>So this code works fine but i find it kinda ugly so i am trying to make an image input instead
So i thought something like that would work..</p>

<pre><code>&lt;input type="image" name="lang" value="http://localhost/index.php?lang=en" src="        &lt;#IMAGES_DIRECTORY#&gt;/english.png"&gt;&lt;/td&gt;
&lt;input type="image" name="lang" value="http://localhost/index.php?lang=it" src="   &lt;#IMAGES_DIRECTORY#&gt;/italian.png"&gt;&lt;/td&gt; 
</code></pre>

<p>But nothing changes, the page always shows up in italian that is the default language..
Thanks in advance from a newbie that is struggling to learn some html and php.</p>
