[FX.php List] help debugging editCompany.php please
Alex Gates
alex at gandrpublishing.com
Tue Aug 26 04:19:41 MDT 2008
Hi John -
In order to edit a record, you need to pass the Record ID of that record.
You'll want to add a line like this:
$request->AddDBParam('recid', $RecID);
note: You'll have to set $RecID to the appropriate Record ID before this
line.
From your question, however, it seems that instead of doing an edit,
you want to create a new record. ("I would expect the data passed from
the form to be inserted into FM.") If this is the case, you don't have a
Record ID yet, so you don't need to worry about that. Simply change
FMEdit() to FMNew()
John Funk wrote:
> I have a PHP form that shows data for a found company, ok so far..
>
>
>
> The form when submitted goes to editCompany.php where I would expect the
> data passed from the form to be inserted into FM.
>
> Using the Debug function, the resulting url gives me an error 958.
>
> Below is the editCompany.php: Anyone care to comment?
>
>
>
> Thank you,
>
> ]John Funk
>
>
>
> <?php
>
> //editCompany.php
>
> require_once ('FX/FX.php');
>
> define('DEBUG', True);
>
>
>
> $CompanyID = $_REQUEST["CompanyID"]; //$CompanyID is valid
>
> $Company = $_REQUEST["Company"]; //$Company is valid
>
>
>
> $request = new FX('127.0.0.1', '80', 'FMPro7');
>
> $request->SetDBData('BoatingIndustry.fp7', 'web_comp');
>
> $request->SetDBUserPass('webuser', 'webpass');
>
>
>
> $request->AddDBParam('COMPANY ID', $CompanyID);
>
> $request->AddDBParam('COMPANY', $Company);
>
> $result = $request->FMEdit();
>
>
>
> ?>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list