Hi everybody
i am beginnet with working with sql in php..so i confused.....i made one scripte and i am making the secound and now i am facing a problem....i hope u could help!!
i have a dat=abse of my chatroom....this is the code i typed...please have a look at it!
$usern=$_SESSION['etchat_'.$this->_prefix.'username'];
$con1 = mysql_connect("localhost","manosir_main","********");
if (!$con1)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("manosir_manoshos_main", $con1);
$users= mysql_query(" select etchat_user_online_user_sex from db1_etchat_useronline where etchat_user_online_user_name = $usern ");
in my database, i ahve a table called db1_etchat_useronline that keeps record of online users in chatroom.
as u usee i qant to to get the user sex ( etchat_user_online_user_sex) of th current user!!! as u see i conected to database correctly but now i dont know how to echo the $users . before this i echo my sql results with mysql_fetch_array ..but now i cant.......i got nothing!!!! can someone help me!!!!! :confused: