Value is incremented by two instead of one

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bob_b
Forum Newbie
Posts: 10
Joined: Fri Jul 18, 2008 10:36 am

Value is incremented by two instead of one

Post by bob_b »

Hi,

I've written a small function within a class. The method grabs a value from the database and, if it's present, increments it by one. If it's not present a new record is inserted. Easy huh? However, when I call the function the value is incremented by two! What on earth is going on here?

SNIP--

I'd be grateful for any help with this one. Many thanks in advance.

Bob.

~~ I've just realised that this is a browser issue.
bob_b
Forum Newbie
Posts: 10
Joined: Fri Jul 18, 2008 10:36 am

Re: Value is incremented by two instead of one

Post by bob_b »

Basically, FF seems to load a page twice if any errors connected with CSS or mark-up are found. I had specified a non-existent CCS file in my html and this caused my page counter to be called twice. IE, Safari and Opera do not have this problem. More info here:

http://www.110mb.com/forum/how-to-stop- ... 704.0.html

This might save someone some time in the future.

Cheers,

Bob.
Post Reply