PDA

View Full Version : javascript and php



ionnnnutz
05-28-2008, 03:00 PM
I have this lines:



<form action="" method="POST">
<select class="mySelect" name="option_language" onchange="this.form.submit();">

<?php

$option_handle = opendir ( PATH . '/langs');
while (false !== ($file = readdir($option_handle)))
{
if ( ereg ('.lng.php', $file) )
{
$option_language = explode ('.', $file);
echo '<option value="' . $option_language[0] . '" ';
if ($cookie_language == $option_language[0]) echo 'SELECTED';
echo '>' . $option_language[0] . '</option>';
}
}
closedir ($option_handle);

?>

</select>
</form>

if i want to change from an select form to anything else - image buttons, simple text - i'm stuck. how can this select can be transform to anything else?Please, anyone can help me?