Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Newbie question mysql_fetch_array

Codes here !

Moderators: macek, egami, gesf

Newbie question mysql_fetch_array

Postby geir » Sat Jun 29, 2013 11:29 am

Hi.
Newbie question ....
I have a database and I am trying to list the content...
but all I get is .... nada... :-(
I have a feeling that I have the data in $result..... but
I am not able to get it out....

Regards,
Geir
Code: Select all
<?php
$con=mysqli_connect("websi.com.mysql", "websi_com", "password");
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
$sql = "SELECT * FROM Filmer";
$result = mysqli_query($con,$sql);
while($row = mysql_fetch_array($result)){
  echo $row['Tittel'] . " " . $row['Prodaar'];;
}
 mysqli_close($con);
?>
geir
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Jun 29, 2013 11:04 am

Return to mySQL & php coding

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.