MySQL Forums
Forum List  »  PHP

how to display database records on a web page?
Posted by: Shiv Prasad
Date: June 06, 2015 05:53AM

Used This Script :-
<?php
$con=mysqli_connect("localhost","root","","esports");
// Check connection
if (mysql_connect_errno())
{
echo "Failed to connect to MySQL";
}
else
{
$result = mysql_query($con,"SELECT * FROM Table_Name");

while($row = mysql_fetch_array($result))
{
echo $row['team1'];
echo "<br>";
}
}
?>

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.