<a href="maPage.php?maVariable=<?php echo $valeurVariable;?>">
et apres tu veux la récuperer dans maPage.php <?php $inThePocket = $_GET['maVariable']; ?>
et voila c dans la poche
voici un exemple de code
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td><a href="index.php?$m="1"">lien 1</a></td><td><a href="index.php?$m="2"">lien 2</a></td><td><a href="index.php?$m="3"">lien 3</a></td></tr>
</table>
<?php
if ($m==1){echo "ca semble marcher???";}
if ($m==2){echo "ca se pourrait bien?";}
if ($m==3){echo "Ca marche!!!!!!!!!!!";}
?>
et voici le message d'erreur
Notice: Undefined variable: m in c:\program files\easyphp1-7\www\test\index.php on line 19/* ce qui correspond à $m==1*/
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php?m=1">lien 1</a></td>
<td><a href="index.php?m=2">lien 2</a></td>
<td><a href="index.php?m=3">lien 3</a></td>
</tr>
</table>
<?php
if ($_GET['m']==1){echo "ca semble marcher???";}
if ($_GET['m']==2){echo "ca se pourrait bien?";}
if ($_GET['m']==3){echo "Ca marche!!!!!!!!!!!";}
?>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><a href="test.php?m=1">lien 1</a></td>
<td><a href="test.php?m=2">lien 2</a></td>
<td><a href="test.php?m=3">lien 3</a></td>
</tr>
</table>
Page test.php :
<?php
echo $_GET['m'];?>
Qu'est-ce-que tu as en faisant ce code ?
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.php?m=1">lien 1</a></td>
<td><a href="index.php?m=2">lien 2</a></td>
<td><a href="index.php?m=3">lien 3</a></td>
</tr>
</table>
<?php
if ($_GET['m']==1){echo "ca semble marcher???";}
if ($_GET['m']==2){echo "ca se pourrait bien?";}
if ($_GET['m']==3){echo "Ca marche!!!!!!!!!!!";}
?>
Je dois filer, je regarderais ça de chez moi si tu n'as pas la solution d'ici là.
if (isset($_GET['m']) {
if ($_GET['m']==1){echo "ca semble marcher???";}
if ($_GET['m']==2){echo "ca se pourrait bien?";}
if ($_GET['m']==3){echo "Ca marche!!!!!!!!!!!";}
}