[FX.php List] A question about editing a record

Bob Patin bob at patin.com
Fri Aug 3 10:55:27 MDT 2007


Here's a question:

When I'm editing a record that has lots of fields (30 or more), I've  
been having to check to see if the user actually inputted anything  
inot each field before including it into my EDIT script. In other  
words, like this:


$search->AddDBParam('-recid',$recid);
if (strlen($first_name)>0){$search->AddDBParam('First_name', 
$first_name);}

Otherwise, if I try to edit using a variable that wasn't actually put  
into the EDIT form (let's say this record doesn't actually HAVE a  
first name), I get a 958 error.

Is there an easier way to check for this?

Should I be using ISSET instead? Is there a way NOT to have to do  
this for each line of my EDIT script?

Thanks,

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

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




More information about the FX.php_List mailing list