vendredi 2 janvier 2015

My PHP code doesn't work on AWS server

I do not understand my mistake. I have tried running the same code on another server(godaddy) and using the same table and it worked but on aws it doesn't work. I have spent lot of time with this. Please check the code and let me know my mistake. Extra suggestions will be respected and appreciated. Its a basic operation of displaying the table elements. :( I have tried mysqli as well. Similar error.


Here is my piece of code I am encountering problems with: (check error here: &&&&---link hidden for privacy---&&)



<?

$link=mysql_connect("localhost", "*****", "********")
or die("Something is broken");
mysql_select_db("ea",$link)
or die("Database not connected");
$msg='';$rcv='';$dt='';
$query = mysql_query("select * from chat where userid='16'", $link);

while ($row1 = mysql_fetch_array($query)) {
$msg=$row1['message'];
$rcv=$row1['receiver'];
$dt=$row1['datetime'];

echo '<br><b>$rcv'.$rcv.'</b>('.$dt.'):'.$msg.'<br>';

}


?>




Aucun commentaire:

Enregistrer un commentaire