9 messages in com.mysql.lists.mysqlRe: MySQL Data Vanishing with FireFox
FromSent OnAttachments
Matt Neimeyer27 Dec 2006 06:45 
Lemuel Formacil27 Dec 2006 07:00 
Jerry Schwartz27 Dec 2006 07:47 
ViSolve DB Team27 Dec 2006 22:11 
Matt Neimeyer28 Dec 2006 06:32 
Jerry Schwartz28 Dec 2006 07:18 
Peter Brawley28 Dec 2006 07:18 
Jerry Schwartz28 Dec 2006 07:56 
JamesDR28 Dec 2006 08:31 
Subject:Re: MySQL Data Vanishing with FireFox
From:JamesDR (jam@trusswood.net)
Date:12/28/2006 08:31:18 AM
List:com.mysql.lists.mysql

Matt Neimeyer wrote:

I think it's your PHP application; how did you "debug" your application?

All this is doing is letting our customer add their contacts to the database. This is on the "quick add" form and asks them to enter a first and last name and an email.

I debugged by re-writing it temporarily to do this...

$SQL = 'INSERT INTO Contacts (ContFirst,ContLast,ContEmail,UserID) VALUES ("' .$_POST["ContFirst"].'","'.$_POST["ContLast"] .'","'.$_POST["ContEmail"].'",'.$MyID.')'; echo $SQL; $result = mysql_query($SQL,$db);

On the theory that the echo shouldn't change the contents of the $SQL variable. Then on the same client machine, I open both browsers and launch the page. In both browsers I can see the exact same statement (including the value of $MyID) on the screen but in IE it works and on FireFox it doesn't.

As soon as I see the SQL on the screen I query directly (not through PHP) to pull out the records and see that UserID is missing.

If UserID is missing ($MyID) track back and see what sets this. If $MyID is missing, it may/may not be the browsers fault. (You've not given us enough code to really help. I have 20 or so 'simple form' apps here all work fine with both IE and FireFox (inserts/updates/deletes/selects) in both PHP and MSASP. ) Can you paste in both statements fully filled out from both browsers? So we can see what the data is looking like (same data.)

As an aside, you may want to be doing SQL injection checking or sanitizing if you aren't already doing so.