[FX.php List] error 958 parameter missing from query

William Akey wcakey at hotmail.com
Fri Mar 31 09:10:18 MST 2006


Michael,

Thanks so much for these additional suggestions. The problems are sporadic and none have been reported to me since modifying the <meta> tag, but this is good to keep in mind and may certainly be of use to others.

William
  ----- Original Message ----- 
  From: Michael Layne 
  To: FX.php Discussion List 
  Sent: Thursday, March 30, 2006 8:39 PM
  Subject: Re: [FX.php List] error 958 parameter missing from query


  This also might help - it helped us tremendously when we found that smart quotes (such as copying/pasting from Word or even values from a FileMaker field being sent through Troi URL plug-in) was causing records not to be added, etc.:

  first the PHP function:

  function convertSmartQuotes($string) { 
      $search = array(chr(145), 
                      chr(146), 
                      chr(147), 
                      chr(148), 
                      chr(151)); 
   
      $replace = array("'", 
                       "'", 
                       '"', 
                       '"', 
                       '-'); 
   
      return str_replace($search, $replace, $string); 
  } 


  then to the incoming values:
   
      $q = new FX($ip,$port);
      $q->SetDBData($db,$lay);
      $q->SetDBPassword('xxxx','xxxx');

      //this is the important bit.......................   
      foreach ($_POST as $key => $value) {
          $realvalue = convertSmartQuotes($value);
          $q -> AddDBParam($key, $realvalue);
      }
      //.........................................................
      $r = $q->FMNew();    

  HTH,

  Michael

  Michael Layne  |  9 degrees development  |  www.9degrees.com  |  404.226.7835  |  Skype: LayneBay


  Bob Patin wrote: 
    What about running an ASCII test to see if it falls within a particular ASCII range? I don't remember the numbers offhand, but you can test to see if it falls within the 2 ranges of upper-case and lower-case English characters... and maybe some punctuation as well. I would imagine there's a PHP function for it somewhere... if not, you could probably find a Javascript function that would do it. It'll slow things down a little though if you have to check every character that comes through. 

    Bob Patin 
    Longterm Solutions 
    bob at longtermsolutions.com 
    615-333-6858 
    http://www.longtermsolutions.com 

      CONTACT US VIA SKYPE: 
         USERNAME: longtermsolutions 

      CONTACT US VIA INSTANT MESSAGING: 
         AIM or iChat: longterm1954 
         Yahoo: longterm_solutions 
         MSN: bob at patin.com 
         ICQ: 159333060 


    On Mar 30, 2006, at 4:32 PM, William Akey wrote: 


      Thanks Michael, 

      Well, it is beginning to come together. Now, the question is, how to prevent 
      the posted data from stopping the registration process cold. I obviously 
      can't control what people submit, so there has to be a way to clean out the 
      junk on the php side of things. 

      This is new territory for me. Any  ideas on how to reliably clean out the 
      junk in php before submitting the query to the database? 

      Thanks 

      William 


      ----- Original Message ----- 
      From: "Michael Ward" <headhoncho at customikesolutions.com> 
      To: "FX.php Discussion List" <fx.php_list at mail.iviking.org> 
      Sent: Thursday, March 30, 2006 3:13 PM 
      Subject: Re: [FX.php List] error 958 parameter missing from query 


      I also had this problem recently... turns out it was a Trademark 
      symbol (™) and a copyright symbol (©) that was mucking something up. 

      I removed those, and everything worked fine. 

      Regards 

      Michael Ward 
      -- 
      Head Honcho 
      CustoMike Solutions 
      Associate, Filemaker Solutions Alliance 
      FileMaker 7 Certified Developer 
      10 Wandoo Crt 
      Wheelers Hill, 3150 
      ph 0414 562 501 
      headhoncho at customikesolutions.com 

      _______________________________________________ 
      FX.php_List mailing list 
      FX.php_List at mail.iviking.org 
      http://www.iviking.org/mailman/listinfo/fx.php_list 
      _______________________________________________ 
      FX.php_List mailing list 
      FX.php_List at mail.iviking.org 
      http://www.iviking.org/mailman/listinfo/fx.php_list 


    _______________________________________________ 
    FX.php_List mailing list 
    FX.php_List at mail.iviking.org 
    http://www.iviking.org/mailman/listinfo/fx.php_list 





------------------------------------------------------------------------------


  _______________________________________________
  FX.php_List mailing list
  FX.php_List at mail.iviking.org
  http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060331/cc580717/attachment.html


More information about the FX.php_List mailing list