donvito7
11-17-2012, 10:13 PM
I am sorry for such a basic questions but I am very fresh in it.
I have a form index.php that sends data to Mysql database.
There is another page content.php that displays most of the data but if it is too much where is a link "more...." and this goes to another file more.php
The link is fine e.g.: http://www.domain.com/more.php?id=3 (it should display data from record id=3
What is wrong with this code?
<body>
<table width=90% align=center rules=none frame=box border=1 cellpadding=8 bgcolor=white>
<tr>
<td width="70%" height="20" class=header> <h1 align="left"><font face="Verdana">Company Logo</font></h1></td>
<td width="30%" height="20" align="right"><img src="images/logo.jpg"></td>
</tr>
</table>
<?
echo '<table width="90%" border="1" align="center" cellpadding="1" cellspacing="1">
<td style="width:5%" align=center class=strong>Ref No:</td>
<td style="width:25%" align=center class=strong>Employee`s name:</td>
<td style="width:8%" align=center class=strong>Date:</td>
<td style="width:5%" class=strong align=center>Link to a file: </td>
</table>;'
$id = (int) $_GET['id'];
$query = mysql_query("SELECT * FROM entries WHERE id = $id")or die('querry error');
while($row = mysql_fetch_assoc($query));
echo "
<td>".$rows['reference']."".$rows['id']."</td>
<td>".$rows['employee']."</td>
<td>".$rows['description01']."</td>;
<td>".$rows['date']."</td>
<td><u><a href='http://abc.domaain.local/uploaded/".$rows['file']."'><font color='#0000ff'>".$rows['file']."</font></u></a></td></tr>"
?>
I have a form index.php that sends data to Mysql database.
There is another page content.php that displays most of the data but if it is too much where is a link "more...." and this goes to another file more.php
The link is fine e.g.: http://www.domain.com/more.php?id=3 (it should display data from record id=3
What is wrong with this code?
<body>
<table width=90% align=center rules=none frame=box border=1 cellpadding=8 bgcolor=white>
<tr>
<td width="70%" height="20" class=header> <h1 align="left"><font face="Verdana">Company Logo</font></h1></td>
<td width="30%" height="20" align="right"><img src="images/logo.jpg"></td>
</tr>
</table>
<?
echo '<table width="90%" border="1" align="center" cellpadding="1" cellspacing="1">
<td style="width:5%" align=center class=strong>Ref No:</td>
<td style="width:25%" align=center class=strong>Employee`s name:</td>
<td style="width:8%" align=center class=strong>Date:</td>
<td style="width:5%" class=strong align=center>Link to a file: </td>
</table>;'
$id = (int) $_GET['id'];
$query = mysql_query("SELECT * FROM entries WHERE id = $id")or die('querry error');
while($row = mysql_fetch_assoc($query));
echo "
<td>".$rows['reference']."".$rows['id']."</td>
<td>".$rows['employee']."</td>
<td>".$rows['description01']."</td>;
<td>".$rows['date']."</td>
<td><u><a href='http://abc.domaain.local/uploaded/".$rows['file']."'><font color='#0000ff'>".$rows['file']."</font></u></a></td></tr>"
?>