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

Andrew Denman adenman at tmea.org
Fri Aug 3 13:09:52 MDT 2007


Bob,

I can't tell where in the submit process this is happening.  To clarify: you
have an edit form with a 'First_name' field.  If the user submits the form
with this field blank, you get a 958 (Parameter missing) error?

If the form was submitted with a blank field, that field should not show up
in the $_POST variable.  Can you show us the code that gives you the 958
error?

Andrew Denman

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Friday, August 03, 2007 11:55 AM
To: FX.php Discussion List
Subject: [FX.php List] A question about editing a record

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


_______________________________________________
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