0

Can someone tell me what is wrong with this code:

<?PHP

include 'topo.php';

include 'db_connect.php';

$sql = "SELECT * FROM cursos";
$query = mysql_query ($sql, $connect);
?>

<table>

<?PHP
while ($row = mysql_fetch_array ($query))
{ 
?>
	<tr>
		<td>
			<div id="navigation-block">
				<ul id="sliding-navigation">
					<li class="sliding-element"><a href="prog_curso.php?cod= <?PHP $row ['cod_curso']; ?> "> <?PHP $row ['nome_cod']; ?> </a></li>
				</ul>			
			</div>
		</td>
		<?PHP
		;}
		?>
		
		<td>
		</td>
		
		<td>
		PROGRAMAÇÃO:
		<br/>
		<?PHP
		$prog = "SELECT prog_curso FROM cursos WHERE prog_curso = '". $row['cod_curso'] ."'";
		
		echo $prog;
		?>
		</td>
	</tr>
</table>

<?PHP

include 'rodape.php';

?>
3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by asprin
0

Try putting echo before the retrieved values on line 21 and 36.

Also, I don't see any use of ';' on line 26.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.