I can easy connect to my remote database but I can`t select my data from it, I use the fallowing code $result=mysql_query($sql); $datarows=array(); while($data = mysql_fetch_array($result)) { $datarows[]=$data; } and my array is empty I use it in Apach server and it works correct. Please help me to solve this issue.