Forum Moderators: coopster

Message Too Old, No Replies

page pointing to google site instead of the expected link

         

dbarasuk

3:55 pm on Jan 20, 2008 (gmt 0)

10+ Year Member



Hi,

Can someone spot what the error of this code is?

It's being redirecting me to the google page instead of the page i normally expect.

Here is the code:

<?php include('../includes/connection.inc.php');

/*include('../includes/logout_script.inc.php'); */
// define working variables = should match the database.table.fields' names
$this_page = $_SERVER['PHP_SELF'];
$IP = $_SERVER['REMOTE_ADDR'];
$date_auto = time();
$darconn = dbconnect('Admin');
$query = "insert into tracker(page, IP, date_auto) values('$this_page', '$IP', '$date_auto')";


mysql_query($query);
// retrieve how many times a particular page has been viewed;
// first define a query to do that
$query = "select count(*)as count from tracker where page = '$this_page'";
$result = mysql_query($query);
$views = mysql_result($result, 0, 'count');

?>



<html>
<head>
<title>Tracker_page</title>
<link rel="stylesheet" type="text/css" href="../CSS/global.css">

</head>

<body>

<div id="navigation">
<?php include('../includes/menu_main.inc.php');?>
</div>
<?php include('../includes/home_format.php');?>

<?php
if(isset($views))
{
echo $views;
}
else
{
echo "The page cannot be shown";
}
?>

</body>
</html>

Cheers,
dbarasuk

venelin13

5:40 pm on Jan 20, 2008 (gmt 0)

10+ Year Member



Where is the google redirect in this code? You should find the condition for this rule. It is not included in this code.

HELLvin

3:03 pm on Jan 21, 2008 (gmt 0)

10+ Year Member



i guess u are using the wrong URI to point to this page.. and as a non-existing domain ur browser redirects u to google..