MySQL Forums
Forum List  »  PHP

shows only the end of the code
Posted by: Justyna Cala
Date: April 14, 2013 08:19AM

Hello

My code is:

<?php
$con=mysqli_connect("localhost","root","","images");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT * FROM images");

while($row = mysqli_fetch_array($result))
{
echo $row['name'] . " " . $row['source'];
echo "<br />";
}

mysqli_close($con);
?>

It doesn't display anything on the website except for the ending of php: "; } mysqli_close($con); ?>

Options: ReplyQuote


Subject
Written By
Posted
shows only the end of the code
April 14, 2013 08:19AM


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.