Welcome to WebmasterWorld Guest from 54.146.230.149

Forum Moderators: ocean10000

Message Too Old, No Replies

PHP on IIS.returning an error

     
1:07 am on Apr 8, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 8, 2004
posts: 175
votes: 0


Hi folks,

I have a client running Windows 2003 server, and he has installed MySQL and PHP and is runnign a number of apps with taht technology.

I have installed a very simple script taht pulled tha news item from the database and displays it on the front page, linked to the news page.

That works fine. But when the user clicks the item, it returns a 404 page not found. I am sure the coding is right, and the news1.php is in place. Is there some reason that, due to the PHP sitting on an IIS server, that would cause the 404?

Here's the code I am using:

<?PHP

$query = "select * from al_news
order by ItemID desc limit 3";

$results=mysql_query($query) or die (mysql_error());
while ($rows=mysql_fetch_array($results))
$a = $rows;

if (isset($a)) {
echo "<img border=0 src=images/news.gif width=53 height=18><br><br>";
}else {echo "";}?>

<?PHP

$Title =$row['Title'];
$Content =$row['Content'];
$ItemID = $row['ItemID'];


$query = "select * from al_news
order by ItemID desc limit 3";

$results=mysql_query($query) or die (mysql_error());
while ($rows=mysql_fetch_array($results)) {
extract ($rows);
echo "::&nbsp;";
echo "<a href='news1.php?ItemID=$rows[ItemID]'>";
echo stripslashes($Title);
echo "</a>";
echo "<br>";
echo "<br>";
}
?>

ANY help would be appreciated.

Pat

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members