From: Peter Brawley Date: December 28 2006 3:18pm Subject: Re: MySQL Data Vanishing with FireFox List-Archive: http://lists.mysql.com/mysql/204105 Message-Id: <4593E05C.7010506@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Matt, >$SQL = 'INSERT INTO Contacts (ContFirst,ContLast,ContEmail,UserID) VALUES ("' > .$_POST["ContFirst"].'","'.$_POST["ContLast"] > .'","'.$_POST["ContEmail"].'",'.$MyID.')'; >echo $SQL; >$result = mysql_query($SQL,$db); If userid is an int, why quote the $myid value? Did you check what's echoed against the server log? PB ----- 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. > >> What data type is column 'C'? Is it ENUM? > > Nope. Nothing compilicated... ContFirst,ContLast are Char(30), > ContEmail is > Char(100), UserID (the one failing) is INT(4). The typical values of > UserID (at > least when debugging, and still failing) were numbers from 1-20. > > Again... since I'm seeing the exact same statement on the screen in > the echo, > theory has it that the exact same statement is being passed into the > mysql_query in the next line. > > This is why I'm so baffled. Normally I echo the actual statement and it's > obvious what my error is. (Oh... a comma...) OR I echo the statement > and see > that FireFox handles cookies different, or passes form values > different, or > truncates $_GET at a different length or some other equally obscure > thing but > still that the STATEMENT differs and I have something to start tracing > from. > Here the statement is identical on both browsers and one fails and the > other > doesn't. > > Any other ideas? > > Matt > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/605 - Release Date: 12/27/2006