Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysqli_connect("localhost","root","","php")
- or die('Could not connect: ' . mysql_error());
- $query = "SELECT * FROM student";
- $result = mysqli_query($con, $query)
- or die('Error querying database.');
- while($row = mysqli_fetch_array($result))
- {
- echo $row['first_name'] . " " . $row['last_name'] . ":" . $row['email'] . "<br />";
- }
- mysqli_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement