Wrong output from php code


#1

what is wrong with this code ?:

<?
$host = "localhost";
$username = "id8280716_userbaze1";
$password = "******";
$dbname = "id8280716_baza1";
$conn=mysqli_connect("$host", "$username", "$password","$dbname") or die(mysqli_error());
mysqli_select_db($conn,$dbname) or die(mysqli_error($conn));
echo "Connected to Database";
$sql="SELECT * FROM jlc_korisnici where 1 ;";
$result=mysqli_query($conn,$sql);
while($row=mysqli_fetch_array($result))
{
echo $row['ime']."<br>";
}
// Free result set
mysqli_free_result($result);
mysqli_close($conn);
?>

I expected content of field ‘ime’
but I receive output :

"; } // Free result set mysqli_free_result($result); mysqli_close($conn); ?>

It is OK. I found solution. Thank you to all who try to help…


#2

Try using <?php instead of <?


#3