[FX.php List] Edit form and if statements

Jonathan Schwartz jschwartz at exit445.com
Sun Feb 21 20:43:47 MST 2010

From experience, it absolutely, positively pays 
to put in strong form validation and data 
conditioning to get good data up front. As Tim 
states, there is no limit to the 
...ahem...creativity ...of the end users when 
filling out a form.  For some, you wonder if they 
have a SHIFT key at all. For others you suspect 
that the CAPS LOCK must be glued down. It might 
take the user an extra 30 seconds to comply with 
a handful of corrections while stiff on the form 
page. It could take dozens of hours for staff to 
correct bad data entries, after the fact.

In general, I think that I spend 5 -10x times 
more effort on building collecting data than I do 
just displaying it.

My 2¢.


>Thank you very much.  Lots of code to write as this is a contact info page.
>But will be really worth it in the long run.
>Thanks to you and Jonathan.
>Jon Montgomery
>On 2/21/10 9:10 PM, "Tim 'Webko' Booth" <tim at nicheit.com.au> wrote:
>>  On 22/02/2010, at 2:05 PM, Jon & Jane Montgomery wrote:
>>>  Please enlighten me on this. They are entering data such as their
>>>  school
>>>  name, believe it or not some don't bother to put that.  I do use
>>>  spry for
>>>  that but somehow I forgot on the page in question.
>>>  Jon Montgomery
>>>  On 2/21/10 8:56 PM, "Tim 'Webko' Booth" <tim at nicheit.com.au> wrote:
>>>>  Then I also check stuff in php on the handling page, as people can
>>>>  turn JavaScript off and avoid the immediate checking.
>>  Simple case - let's just have a text field.
>>  Obviously we can use Spry to say "Fill out your school name, dumkopff"
>>  - but if they have JacaScript turned off or you forgot, then we should
>>  test for the existence of the value on the handling page. Long version
>>  of the check:
>>  session_start();
>>  $_SESSION['error'] = "";
>>  if (isset($_POST['school']) $$ $_POST['school'] != "") {
>>  echo "All is well";
>>  //Do all our normal stuff
>>  } else {
>>  $_SESSION['error'] = "No school name";
>>  header['Location: input.php'];
>>  }
>>  And check for the existence of the session variable and echo it out to
>>  the page if required...
>>  HTH
>>  Webko
>>  _______________________________________________
>>  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

Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com

More information about the FX.php_List mailing list