I have just started my php coding abt 2 weeks, i am using mysql database for storing the data. My problem is when I click on a php link to another file ,the page appear without required data frm database. Where did i go wrong?
here is the link line from the main file <a href="list-sym.php?idsym=<?echo $read[0];?>"><? echo "$read[1]<br><p>";?></a>
here is the list-sym.php file:
$dbsamb//ung=mysql_connect("localhost","root","");
mysql_select_db("testsympo",$dbsambung);
$query =" SELECT idsym,title,author, department,day,month,year,synopsis
FROM sympo where idsym='$idsym'";
$result = mysql_query($query,$dbsambung);
$read = mysql_num_rows($result);
<table width="75%" border="0">
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><u><? echo "$read[1]"; ?></u></b></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo "$read[2]"; ?></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo "$read[3]"; ?></font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Synopsis</b></font></td>
</tr>
<tr>
<td>
<p align="justify"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo "$read[7]"; ?></font></p>
</td>
</tr>
</table>