[FX.php List] An odd problem when going to production server
Troy Meyers
tcmeyers at troymeyers.com
Fri Apr 3 20:26:54 MDT 2009
John,
This might work:
$request->AddDBParam('Contact',( (isset($_REQUEST['Contact'])) ? ($_REQUEST['Contact']) : ("") ));
I know there must be more () than needed but I can't ever remember the precedence of the ternary operator.
This doesn't answer "why" but it may take care of the problem. "Why" might be it's a radio button?
-Troy
> I have code that writes data to FileMaker using:
>
> $request->AddDBParam('Contact', $_REQUEST['Contact']); // data may or
> may not be passed by the post
>
> On my development web server it worked fine, but on my production
> server I get an index error on the fields where there is no data passed.
> I know I can write an if condition for this, but I am curious why I did
> not get the index error before now?
>
> John Funk
More information about the FX.php_List
mailing list