baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from Sander on 8/28 2009, 08:31 +00:00

    Re: How to prevent blank entries?


      put this code above <do action...>
      <perl>
      if(%_put){
      @needed_fields=("Fieldname 1","Fieldname 2"); # you can add more fields...
      foreach(@needed_fields){
          if(!$_put{$_}){
            push @missed,$_;
          }
        }
        if (@missed){
          out "Error:<br>".join("<br>",@missed)."<br>This fields are required";
          $cmd=$_get{cmd}="";
          undef(%_put);
        }

      }

    Your reply:

    Name: EMail: WWW:
    Subject:
    Text:
    Timezone:

    Post a new message


 All messages from this thread: To the list 
    Message from User on 8/24 2009, 19:08 +00:00
    EMail: mbel@cox.net

    How to prevent blank entries?


      Is there a way to prevent a user to submit a blank entry to the database?
     Post a reply

    Message from Sander on 8/28 2009, 08:31 +00:00

    Re: How to prevent blank entries?


      put this code above <do action...>
      <perl>
      if(%_put){
      @needed_fields=("Fieldname 1","Fieldname 2"); # you can add more fields...
      foreach(@needed_fields){
          if(!$_put{$_}){
            push @missed,$_;
          }
        }
        if (@missed){
          out "Error:<br>".join("<br>",@missed)."<br>This fields are required";
          $cmd=$_get{cmd}="";
          undef(%_put);
        }

      }

     Post a reply
     

 Messages from 150 to 300: To the input form 
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >>


Back to the homepage

© baseportal.com. All rights reserved. Terms of use



powered in 0.04s by baseportal.com
Get your own Web Database - for FREE!