Hi, i meet a problem: on the same page, i would like to get parameter in URI when i click on <a href….> link such as the following code (i am tried many way but can not, because i am new and only program php about 2 months).
[COLOR=”#FF0000″]home.php?page=den-da[COLOR=”#0000FF”]$nam
[code=html]<table width=”100%” border=”0″ align=”center” cellspacing=”3″>
<tr>
<td>
<?php
$sql_nam = @mysql_query(“select YEAR(ngaycv) as nam from congvan_den group by nam order by nam DESC”);
while($rownam = @mysql_fetch_array($sql_nam))
{
$nam = $rownam[‘nam’];
$asn = $nam.” | “;
echo ‘<a href=”home.php?page=den-da&year=’.$nam.'” style=”text-decoration: none”>’.$asn.'</a>’;
}
?>
</td>
</tr>
<tr>
<td>
<?php
//$actual_link = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
if(isset($_GET[‘year’]))
{
$year = $_GET[‘year’];
$sql_thang = “select YEAR(ngaycv) as nam, MONTH(ngaycv) as thang from congvan_den where nam = “.$year.” group by nam, thang order by thang DESC”;
while($rowthang = @mysql_fetch_array($sql_thang))
{
$n = $rowthang[‘nam’];
$t = $rowthang[‘thang’];
$ast = $thang.” | “;
echo “<a href=’getyear.php?nam=”.$n.”&thang=”.$t.”‘ style=’text-decoration: none’>”.$ast.”</a>”;
}
}
?>
</td>
</tr></table>
Thanks for any your help.