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';

?>

what is the problem?

I'm sorry i already solved the problem.

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.