Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 14th, 2004, 12:29 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Browser specific bugs

I'm writing a script to deal a game of Texas Hold'em Poker.

The script uses sessions and includes some php and html files (header, footer, functionLib).

When using FireFox and Netscape Navigator, the script deals 2 cards on the turn and river, but in subsequent games it deals only 1 (like it's supposed to).

For those who don't know. In Hold'em, every player gets 2 down or pocket cards. Then 3 community cards are dealt face up in the middle of the table: this is the flop. Then 1 more community card is dealt: the turn. And finally one more community card: the river.

When using MS IE, the script works fine! It deals one card on the turn and river during the first game (and is subsequent games).

In short, FireFox and Navigator deal 2 cards during the first game when it's supposed to deal 1. IE does not have this problem.

Check it out at: http://pokeredu.com/exercises/holdem/holdem.php

(To see the bug again, be sure to close all windows of your browser to restart the session.)

I suspect it has something to do with the sessions and the brower's type.

Any ideas?

Thanks!
Dirk Bruins

Thanks!
Dirk
 
Old December 14th, 2004, 09:08 PM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's solved ... I put all the functions in the main script (i.e. instead of including a functionLib).

Not sure what's going on, but it's a solution. ;)

Thanks!
Dirk
 
Old December 16th, 2004, 05:21 PM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another thing I found was if I only included one fn library there were no bugs. But if 2 libraries are included it lead to problems.

Thanks!
Dirk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy specific data in specific cells of sheet2 yogeshyl Excel VBA 1 May 14th, 2007 07:40 AM
Specific-browser Rendering by Web Controls mrf ASP.NET 2.0 Basics 0 August 24th, 2006 03:57 PM
Heighlight specific text when open file in browser salman Classic ASP Databases 1 May 5th, 2004 02:07 PM
Heighlet Specific Word when open file in a browser salman Classic ASP Databases 1 March 30th, 2004 06:30 AM
Heighlet specific Text when open file in browser salman Classic ASP Databases 0 March 30th, 2004 05:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.