All pastes #20032 Raw Edit

Mine

public text v1 · immutable
#20032 ·published 2005-08-15 02:21 UTC
rendered paste body
<?php
   echo '
      <p>
         Customer Details
      </p>

      <!-- start of: search form -->
      <form
         action  = "';
      
      $pages = array 
      (
      'Customer Search' => 'customer_search.php',
      'Customer Update' => 'customer_update.php'
      );    
      
      foreach ($pages as $page_name => $page_loc){
         if($page_name == $this_page){
            echo $page_loc;
         }
      }
         
      $s_types = array 
      (
      'group_name' => 'Name:',
      'street' => 'Street:',
      'city' => 'City:',
      'province' => 'Province:'
      );    
         
   echo '"
         id      = "search"
         method  = "post">

         <p>
          <input
               type    = "submit"
               name    = "search2"
               value   = "+" 
               tabindex = "0"/>
         
            <select
               id   = "search_type"
               name = "search_type">
               ';
               
         foreach ($s_types as $s_type => $s_type_title){
            echo '<option';
            if($search_type == $s_type){
               echo ' selected = "selected"';
            }
            echo ' value = "'.$s_type.'">
               '.$s_type_title.'
               </option>';
         }
      
      
         $o_types = array 
         (
         '=' => 'is equal to',
         'LIKE' => 'contains'
         );    
      
      
      echo '
            </select>
            <select
               id   = "operator"
               name = "operator">';
               
               
      foreach ($o_types as $o_type => $o_type_title){
         echo '<option';
         if($operator == $o_type){
            echo ' selected = "selected"';
         }
         echo ' value = "'.$o_type.'">
         '.$o_type_title.'
         </option>';
      }
               
            echo '
            </select>
            <input 
               id        = "search_word"
               maxlength = "45"
               name      = "search_word"
               size      = "30"
               type      = "text"
               value     = "'.$search_word.'" />
           
                        
         </p>';
         
         if(isset ($search2)){
         echo '
         <p>
            <select
               id   = "search_bool2"
               name = "search_bool2">
               <option
                  value = "OR">
                  or
               </option>
               <option
                  selected = "selected"
                  value = "AND">
                  and
               </option>
            </select>
            <select
               id   = "search_type2"
               name = "search_type2">
               <option
                  value = "group_name">
                  Name:
               </option>
               <option
                  value = "street">
                  Street:
               </option>
               <option
                  value = "city">
                  City:
               </option>
               <option
                  value = "province">
                  Province:
               </option>
            </select>
            <select
               id   = "operator2"
               name = "operator2">
               <option
                  value = "LIKE">
                  contains
               </option>
               <option
                  selected = "selected"
                  value    = "=">
                  is equal to
               </option>
            </select>
            <input 
               id        = "search_word2"
               maxlength = "45"
               name      = "search_word2"
               size      = "30"
               type      = "text" 
               value     = "'.$search_word2.'" />
         </p>
            ';
   
      }
         
      echo '
         <p>
            <input 
               name  = "whereami" 
               type  = "hidden"
               value = "form_done" />
            <input
               name  = "submit"
               type  = "submit"
               value = "Search" />
            &nbsp;
            <input
               name  = "reset"
               type  = "reset"
               value = "Reset" />
               
         </p>
      </form>
      <!-- end of: search form -->

   ';
?>