i have a table named "index", with 2 rows in it: title and text
the code is:
<?php
$con = mysql_connect("localhost", "elenbyin_vadim", "passr422");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db("elenbyin_vadim", $con);
$sql = "SELECT * from index";
$result = mysql_query($sql,$con);
echo mysql_result($result,0);
mysql_close($con);
?>
but i'm getting an annoying error: Warning: mysql_result() expects parameter 1 to be resource, boolean given in /home/elenbyin/public_html/elenby.co.il/vadim/tryout.php on line 14
and i have no idea what to do anymore, no matter what i have tried - doesn't work! how can i fix this and get the information from the tables?