[FX.php List] Duplicate data solved

Jane Chinn Jane.Chinn at cwu.EDU
Thu Dec 9 17:59:31 MST 2004


Hi,

I searched FMFormums online and found a post that solved this.  Someone 
recommended the following:

  It turns out that FM7SA doesn't play well with the POST method. You 
can still use the post method for web forms, but you need to 
communicate with the server using GET.

In FX.php, lines 97 and 98, set the following to false:

var $isPostQuery = false;
var $useCURL = false;

After I did this, no problems.

On Dec 9, 2004, at 4:14 PM, Jane Chinn wrote:

>
> Hi,
>
> I'm just starting to learn FX.php with FMPro7 and am using FX.php in 8 
> Hours to learn.  I've adapted the code as I understand it to be for 
> FMPro7.  Can anyone tell me why I would get duplicate data when 
> submitting a new record with FMPro7.   A new record is created but the 
> values appear twice in the database.
>
> Here is the file:
>
> <?php
> include_once('FX/FX.php');
> include_once('FX/FMErrors.php');
> include_once('FX/server_data.php');
>
> $newrecord=new FX($serverIP,$portNumber);
> $newrecord->SetDBData('contacts.fp7','main');
> $newrecordResult=$newrecord->FMView();
>
> ?>
>
> </head>
>
> <body>
> <?php
> include_once("includes/header.php");
> ?>
> <br>
> <form method="post" action="new_response.php">
> <table width="500" border="0" cellspacing="3" cellpadding="0">
>   <tr class="ver12">
>     <td width="50%"><div align="right">First name</div></td>
>     <td><input type="text" name="name_first" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Last name</div></td>
>     <td><input type="text" name="name_last" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Phone (hm)</div></td>
>     <td><input type="text" name="phone_home" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Phone (wk)</div></td>
>     <td><input type="text" name="phone_work" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Phone (cell)</div></td>
>     <td><input type="text" name="phone_cell" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Address</div></td>
>     <td><input type="text" name="address1" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Address2</div></td>
>     <td><input type="text" name="address2" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">City</div></td>
>     <td><input type="text" name="city" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">State</div></td>
>     <td><select name="state">
> <?php
> foreach($newrecordResult['valueLists']['state'] as $key=>$value){
> ?>
> <option value="<?php echo $value; ?>"><?php echo $value; ?></option>
> <?php
> }
> ?>
> </select>
>
> </td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Zip/Postal Code</div></td>
>     <td><input type="text" name="zip" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Country</div></td>
>     <td><input type="text" name="country" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Hotel</div></td>
>     <td><input type="text" name="hotel" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Flight in date</div></td>
>     <td><input type="text" name="flight_in_date" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Flight in time</div></td>
>     <td><input type="text" name="flight_in_time" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Flight out date</div></td>
>     <td><input type="text" name="flight_out_date" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Flight out time</div></td>
>     <td><input type="text" name="flight_out_time" value=""></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Requests</div></td>
>     <td><textarea name="requests" cols="20" rows="3"></textarea></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right">Notes</div></td>
>     <td><textarea name="notes" cols="20" rows="3"></textarea></td>
>   </tr>
>   <tr class="ver12">
>     <td><div align="right"></div></td>
>     <td><input type="image" name="submit" 
> src="images/continue.gif"></td>
>   </tr>
> </table>
> </form>
> <p>&nbsp;</p>
> </body>
> </html>
>
> Thanks,
> Jane
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4441 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20041209/fd381155/attachment.bin


More information about the FX.php_List mailing list