[FX.php List] Strange problem with editing records

Jonathan Schwartz jschwartz at exit445.com
Sat Mar 8 09:10:56 MST 2008


Bob,

Something is different between your environment and theirs.  You know 
what the form data says when originally created, and you know what 
the db record says after it is updated, but you don't know what the 
server is actually receiving at the time the problem occurs.

Try my earlier suggestion.  Create a filemaker log file that records 
data during desired events. I would record:
	- arrival to each page. Record recid
	- edit of FMP record. Record recid.

With this, you start to see exactly what is being passed from page to 
page and then to FMP. Plus, you get to see the browser and OS 
environment...all value clues.

Let me know if you need the sample log.php page plus the code I use 
to include. Code is below.

I couldn't survive w/o my log file. ;-)

J

add code at point of desired log-------------

			$Step = "Your Page or Step";
			$Name= $_SESSION['your value']; //
			$Detail =$_POST['recid'];
			include('log.php');
------------------------

log.php ----------------
			include_once ("FX/FX.php");
			include_once ("FX/server_data.php");

			$IP = $_SERVER['HTTP_PC_REMOTE_ADDR'];
			$AGENT = $_SERVER['HTTP_USER_AGENT'];

			$hostname=gethostbyaddr($IP);

			$log = new FX($serverIP, $dataPort, 
$dataSourceType, $scheme);
			$log->SetDBData ('log.fp7','web');
			$log->SetDBPassword ($webPW, $webUN); 
			$log->AddDBParam ('IP', $IP);
			$log->AddDBParam ('Browser', $AGENT);
			$log->AddDBParam ('Location', $_SERVER['PHP_SELF']);
			$log->AddDBParam ('DB', 'Your DB Name');
			$log->AddDBParam ('hostname', $hostname);

			//Custom Fields
			$log->AddDBParam ('step', $Step);
			$log->AddDBParam ('Name', ucwords(trim($Name)));
			$log->AddDBParam ('Detail', $Detail);

			$logResult = $log->FMNew();
			//echo $logResult['errorCode'];
------------------


At 8:43 PM -0600 3/7/08, Bob Patin wrote:
>It just gets odder...
>
>I logged in, opened one of the forms in Firefox, and then let it 
>stay open on that page for 2.5 hours.
>
>I modified the PROCESS page so that it would echo the 
>$_POST['-recid'], which is how the hidden field's named; I then put 
>an exit so the form wouldn't actually write anything.
>
>When I went back to the form, and then clicked the SUBMIT button, it 
>reported the correct RECID.
>
>I can't find anything wrong, but my client tells me that they've 
>tested this over and over, with the same error occurring 
>consistently.
>
>It's not using a session variable in any way for the RECID, so I 
>can't understand why the RECID variable seems to be getting 
>rewritten to a variable of "1." Very strange...


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852


More information about the FX.php_List mailing list