select onchange avec variable PHP
Bonjour,
voila j'ai un select avec onchange que me permet de changer un div avec la visualation des photos par rapport aux choix du select.
Je voudrais maintenant récuperer le select sélectionné et mettre dans une variable PHP, mais je ne sais pas comment?
index.php
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <select onChange=\'ChangerImage(this)\' name="illustration" size="5" style="width:150px;">';
foreach($managerIllustration->getListById($_GET['id']) as $ListIllustration)
{
$img = $managerIllustration->getUnique($_GET['ref_appartement']);
$Appartement = $managerAppartement->getUnique($_GET['id']);
$body.='<option value="'.RACINE_BACKEND.'illustrations/home/'.$Appartement->getId().'/'.$ListIllustration->getLegende().'_home.jpeg">'.$ListIllustration->getLegende().'</option>';
}
$body.='
</select> |
BASE.PHP
Code:
1 2 3 4 5
| <script>
function ChangerImage(t) {
document.getElementById('Image').src = t.value
}
</script> |
merci.