[FX.php List] PHP error help

CSInfo CSinfo at comcast.net
Mon Jun 30 14:04:40 MDT 2008


FYI:
The line:
$createResult=$create=>FMFindAll();
should be:
$createResult=$create->FMFindAll();
 
 
I got my query to work, now I am getting an error when I submit fields from
the HTML from as POST that are empty? (resulting in no POST) How do I ignore
those?
 
 
Below is my current code:
<?php
include_once('FX/FX.php');
include_once('includes/RAMserverinfo.php');
 
$surveyin=new FX($serverIP,$serverPort,'FMPro7');
$surveyin->SetDBData($dbname,$weblayout,$groupSize);
$surveyin->SetDBPassword($pw,$un);
$surveyin->AddDBParam('Name',$_POST['Name']);
$surveyin->AddDBParam('RAMSurveyID',$_POST['RAMSurveyID']);
$surveyin->AddDBParam('Location',$_POST['Location']);
$surveyin->AddDBParam('A1',$_POST['A1']);
$surveyin->AddDBParam('A2',$_POST['A2']);
$surveyin->AddDBParam('A3',$_POST['A3']);;
$surveyin->AddDBParam('A4',$_POST['A4']);
$surveyin->AddDBParam('A5',$_POST['A5']);
$surveyin->AddDBParam('Comments',$_POST['Comments']);
$surveyinResult=$surveyin->FMNew();
 
//print_r( $surveyinResult );
//echo $surveyinResult['errorCode'];
foreach($surveyinResult['data'] as $key=>$surveyinData);
 
?>

  _____  

From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Monday, June 30, 2008 10:43 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] PHP error help


John, 

Here's one way to test your server setup: 

Create a query that doesn't have any parameters other than the database
info, like this:

$serverIP = '0.0.0.0';
$webCompanionPort = '80';
$dbname = 'mydb.fp7';
$pw = 'my_password';
$un = 'my_username';
$create =new FX($serverIP,$webCompanionPort);
$create->SetDBData($dbname,'mylayout');
$create->SetDBPassword($pw,$un);
$createResult=$create=>FMFindAll();
echo $createResult['foundCount'];

If you don't get any results at all (nothing is echoed) then your database
isn't being queried--which means that 

your IP address, port, username, or password are wrong
your FM setup is not working
your layout name is wrong
your database name is wrong

I don't have a connection test page but if someone does have something like
that, I'd like to have a copy of it as well for future use with offsite
clients.

Thanks,

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet

  INSTANT MESSAGING:
     AIM or iChat: longterm1954

--------------------------
Contact us for FileMaker hosting and programming for all versions of
FileMaker
PHP . Full email services . Free DNS hosting . Colocation . Consulting



On Jun 30, 2008, at 9:33 AM, CSInfo wrote:



Bob, I saw that after I sent the first posting, thanks. I fixed and it and I
still get the same message.

By the way, I used FXForge for a template for the code.
 
Anybody care to debug my code? If so send an email off the list. I could
send the db, html form and php script.
 
Does somebody have a simple php file (no includes) to test a connection ? I
am guessing that is my problem since this deployment was full of problems.
 
Thanks
John Funk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20080630/5ca5733e/attachment-0001.html


More information about the FX.php_List mailing list