<?php
$username='miguelde_modulo4';
$password='modulo4';
$dbname='miguelde_modulo4';
$host='localhost';
try {
 $conn = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
 $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 $sql='SELECT * FROM aluno ';
 $data = $conn->query($sql);
 foreach($data as $row) {
 echo($row[0]);
 echo($row[1]);
 echo($row[2]);
 echo($row[3]);
 echo($row[4]);
 echo($row[5]);
 echo($row[6]).'<br>';
 }
} catch(PDOException $e) {
 echo 'ERROR: ' . $e->getMessage();
}
 ?>