par
Picolo220 » 16 mai 2013, 01:58
Il te faut un formulaire aussi, pas uniquement un input...
Page source :
<form method="post" action="target.php">
<input type="checkbox" name="check1" id="1" value="1" ><label for="1" > TANGER </label><br/>
<input type="submit" value="Valider"/>
</form>
Page cible (target.php) :
<?php
if(isset($_POST['check1']) && $_POST['check1']==1) {
echo "t'as choisi comme ville: TANGER";
}else {
echo "t\'as pas choisi TANGER COMME VILLE";
}
?>
Il te faut un formulaire aussi, pas uniquement un input...
Page source :
[html]
<form method="post" action="target.php">
<input type="checkbox" name="check1" id="1" value="1" ><label for="1" > TANGER </label><br/>
<input type="submit" value="Valider"/>
</form>
[/html]
Page cible (target.php) :
[php]
<?php
if(isset($_POST['check1']) && $_POST['check1']==1) {
echo "t'as choisi comme ville: TANGER";
}else {
echo "t\'as pas choisi TANGER COMME VILLE";
}
?>
[/php]