0

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

3
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by phpDave
0

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.

0

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

0

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.

0

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

0

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.

0

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

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.