mlecho
07-10-2007, 06:21 AM
hi all...i think this question will belong here. i am making an ajax application. The XMLHttpRequest works great for all my scripts except this one:
<?php
header("Content-Type: text/xml");
include("contact/local.php");
$table="news_b";
$query="SELECT * FROM $table ORDER BY Id DESC";
$result=mysql_query($query);
echo("<news>");
while($answer=mysql_fetch_assoc($result)){
echo ("<entry>");
echo ("<id>".$answer['Id']."</id>");
echo ("<date>".$answer['Date']."</date>");
echo ("<title>".$answer['Title']."</title>");
echo ("<text>".$answer['Text']."</text>");
echo("</entry>");
}
echo ("</news>");
?>
firefox has no problems, but IE sees it as response.Text..... i have other php scripts along the same format for an image gallery that works fine in both browsers....what am i doing wrong? Or do i need to move this question to the Javascript forum?
FYI- i did script this in hard xml to test on IE, and then it worked, so something buggy is happening in the php....i think.
<?php
header("Content-Type: text/xml");
include("contact/local.php");
$table="news_b";
$query="SELECT * FROM $table ORDER BY Id DESC";
$result=mysql_query($query);
echo("<news>");
while($answer=mysql_fetch_assoc($result)){
echo ("<entry>");
echo ("<id>".$answer['Id']."</id>");
echo ("<date>".$answer['Date']."</date>");
echo ("<title>".$answer['Title']."</title>");
echo ("<text>".$answer['Text']."</text>");
echo("</entry>");
}
echo ("</news>");
?>
firefox has no problems, but IE sees it as response.Text..... i have other php scripts along the same format for an image gallery that works fine in both browsers....what am i doing wrong? Or do i need to move this question to the Javascript forum?
FYI- i did script this in hard xml to test on IE, and then it worked, so something buggy is happening in the php....i think.