Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php
  2.     require_once('/includes/validate.php');
  3.     require_once('/includes/form.php');
  4.  
  5.     if(isset($_POST["submit"])){       
  6.         $name = $_POST['name'];
  7.         $company = $_POST['company'];
  8.        
  9.         $contact_validate = new Validate();
  10.        
  11.         $contact_validate->min_max('name', $name, 'Name', 1);
  12.         $contact_validate->min_max('company', $company, 'Company', 1);
  13.        
  14.        
  15.         echo $contact_validate->display_message("boo you suck!", "hurray you're awesome!");
  16.     }
  17.    
  18.     $departments = array(
  19.         "none" => array(
  20.         "id" => "none",
  21.         "name" => " ",
  22.         "email" => " " 
  23.         ),
  24.         "Sales" => array(
  25.         "id" => "sales",
  26.         "name" => "Sales",
  27.         "email" => "sales@posim.com"
  28.         ),
  29.         "Support" => array(
  30.         "id" => "support",
  31.         "name" => "Support",
  32.         "email" => "support@posim.com"
  33.         ),
  34.         "E-commerce" => array(
  35.         "id" => "ecommerce",
  36.         "name" => "E-Commerce",
  37.         "email" => "info@eposim.com"
  38.         ),
  39.         "Credit Card Processing" => array(
  40.         "id" => "pccp",
  41.         "name" => "Credit Card Processing",
  42.         "email" => "pccp@posim.com"
  43.         ),
  44.         "Gift & Membership Cards" => array(
  45.         "id" => "gc",
  46.         "name" => "Gift Cards",
  47.         "email" => "giftcard@posim.com"
  48.         ),
  49.         "Other" => array(
  50.         "id" => "other",
  51.         "name" => "Other",
  52.         "email" => "admin@posim.com"
  53.         )
  54.     );
  55.    
  56.    
  57.    
  58. ?>
  59. <html>
  60. <head></head>
  61. <title></title>
  62.  
  63. <body>
  64.  
  65. <form action="testFile.php" method="post">
  66.     <div class="form_row required">
  67.         <label for="department">Department</label>
  68.         <select>
  69.             <?php
  70.                 Form::dropMenu($departments, 'department');
  71.             ?>
  72.         </select>
  73.     </div>
  74.     <div class="form_row required">
  75.         <label for="name">Name</label>
  76.         <input type="text" name="name" id="name" value="<?php ?>" />
  77.     </div>
  78.     <div class="form_row">
  79.         <label for="company">Company</label>
  80.         <input type="text" name="company" id="company" value="<?php ?>" />
  81.     </div>
  82.     <div class="form_row">
  83.         <input type="submit"" name="submit" value="submit" id="submit_form" />
  84.     </div>
  85. </form>
  86.  
  87. </body>
  88. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement