Hi,
I have a counter and it works fine in firefox, but when I try to bring up the page to be counted in internet explorer in does not work. The page wont even be brought up in the browser. If I disconnect the include file to the counter it works fine. Here is the code for counter.php

$hostname_conadmin = "localhost";
$database_conadmin = "db";
$username_conadmin = "xyz";
$password_conadmin = "123456";
$conadmin = mysql_pconnect($hostname_conadmin, $username_conadmin, $password_conadmin) or trigger_error(mysql_error(),E_USER_ERROR); 

$colname_Recordset1 = "-1";
if (isset($_GET['abc'])) {
  $colname_Recordset1 = $_GET['abc'];
mysql_query("UPDATE xyz SET counter = counter + 1 WHERE abc = '$colname_Recordset1'");
print_r(mysql_fetch_assoc($result));
  header(sprintf("Location: %s", $updateGoTo));
?>

Thanx
PS. I'm using ie7

display your query and check if your condition is true. Browser can never effect on programming like php. It just can effect javascript, HTML or CSS.

Everything looks correct. What does not work in IE:?
1. IE does not get "abc" and db is not updated
2. "abc" has incorrect value
3. redirect to $updateGoTo does not work

first and second you can check with debug echo, third you can check with some http sniffer

Thanks for response, Maybe I should explain better. The counter is to count page views of a users personal page.
Second, I'm still a little new to php, not sure what you meant.

every thing is file, check your code once again. every value is coming correctly?

what error you are facing in IE7?

thanx again,
the problem in IE7 is:
when I go to the page it just does not come up in the browser, I do have some java script in there but like I stated, it works fine if I disconnect the include file to the page in question.

what file you are including? I am not able to see any code to include any file. :s

The include file is the counter.

If anyone is interested:
All I did to solve this is remove the include file all together and implemented the counter code on the page itself. It works fine!

Still not sure why I had the problem though. All I do know is that it would not connect to the database with IE.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.