I am using Apache2 and PHP 5.3.2 to create a website. With Ubuntu Linux 10.04 this works as expected. I attempted to copy the files to a laptop using XAMPP but the results were bad. I noticed that XAMPP uses php 5.3.1 and thought I need to upgrade the PHP version. After downloading WAMPSERVER and trying again, I was successful in downloading version 5.3.2 and confirmed that it is really running using phpinfo().
This results in data appearing on the webpage with my Ubuntu setup, but with WAMP and XAMPP I get the following:
Notice: Undefined offset: 4 in c:\wamp\www\bingo\bingoviewgamedates.php on line 55
Notice: Undefined offset: 5 in c:\wamp\www\bingo\bingoviewgamedates.php on line 55
Notice: Undefined offset: 8 in c:\wamp\www\bingo\bingoviewgamedates.php on line 56
Notice: Undefined offset: 11 in c:\wamp\www\bingo\bingoviewgamedates.php on line 59
Notice: Undefined offset: 14 in c:\wamp\www\bingo\bingoviewgamedates.php on line 59
Notice: Undefined offset: 17 in c:\wamp\www\bingo\bingoviewgamedates.php on line 59
Notice: Undefined offset: 20 in c:\wamp\www\bingo\bingoviewgamedates.php on line 60
Notice: Undefined offset: 21 in c:\wamp\www\bingo\bingoviewgamedates.php on line 60
Notice: Undefined offset: 22 in c:\wamp\www\bingo\bingoviewgamedates.php on line 60
Notice: Undefined offset: 27 in c:\wamp\www\bingo\bingoviewgamedates.php on line 64
Notice: Undefined offset: 29 in c:\wamp\www\bingo\bingoviewgamedates.php on line 64
These errors repeat for each pass through the loop reading data from the database.
Does anyone know why this works in Linux but fails in Windows? I really need a way to make it work in both Windows and Linux.
You’re correct, JavaScript would be a challenge, but I am actually using SUBMIT “buttons” in HTML, not JavaScript. FireFox works as expected with 2 submit buttons of the same name with different value=“” parameters but Internet Explorer seems to have difficulty with this. I’m going to recode using 2 different name= parameters and test to see which button was clicked instead of the value passed in the button.
I actually put this inside my script that opens the database. Since I do this at the top of every .php file I thought it would be a quick and easy way to find errors. It showed an error where I pass gamedate via POST but look for _gamedate when I retrieve the data on the next page. After fixing the page I get the message “Abort Changes Update aborted!X” instead of having new data inserted when clicking the “Add Game Data” button on the page above. Still, being able to find errors will make debugging a simpler process. Thanks.
Not exactly sure how I fixed this, maybe the MySql server wasn’t running when I tested it (didn’t change anything yet) but the site still doesn’t work correctly. AT the bottom of the next form are two buttons: “Add Game Data” and “Abort Changes”. Clicking either has the expected result in Linux, but in Windows it acts as if “Abort Changes” was clicked no matter which is clicked. The code used for this is:
Clicking either has the expected result in Linux, but in Windows it acts as if “Abort Changes” was clicked no matter which is clicked. The code used for this is:
That would appear to be a html problem - you are using buttons to submit instead of submit inputs, its ok to do that but you have to be very sure about one instruction wiping out another and (usually) how any JS validation is structured, as well as browser differences.
Try changing them to:
<input type=“submit”>
and search SP for the term “two submit buttons one form” or similar.