Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('/includes/validate.php');
- require_once('/includes/form.php');
- if(isset($_POST["submit"])){
- $name = $_POST['name'];
- $company = $_POST['company'];
- $contact_validate = new Validate();
- $contact_validate->min_max('name', $name, 'Name', 1);
- $contact_validate->min_max('company', $company, 'Company', 1);
- echo $contact_validate->display_message("boo you suck!", "hurray you're awesome!");
- }
- $departments = array(
- "none" => array(
- "id" => "none",
- "name" => " ",
- "email" => " "
- ),
- "Sales" => array(
- "id" => "sales",
- "name" => "Sales",
- "email" => "sales@posim.com"
- ),
- "Support" => array(
- "id" => "support",
- "name" => "Support",
- "email" => "support@posim.com"
- ),
- "E-commerce" => array(
- "id" => "ecommerce",
- "name" => "E-Commerce",
- "email" => "info@eposim.com"
- ),
- "Credit Card Processing" => array(
- "id" => "pccp",
- "name" => "Credit Card Processing",
- "email" => "pccp@posim.com"
- ),
- "Gift & Membership Cards" => array(
- "id" => "gc",
- "name" => "Gift Cards",
- "email" => "giftcard@posim.com"
- ),
- "Other" => array(
- "id" => "other",
- "name" => "Other",
- "email" => "admin@posim.com"
- )
- );
- ?>
- <html>
- <head></head>
- <title></title>
- <body>
- <form action="testFile.php" method="post">
- <div class="form_row required">
- <label for="department">Department</label>
- <select>
- <?php
- Form::dropMenu($departments, 'department');
- ?>
- </select>
- </div>
- <div class="form_row required">
- <label for="name">Name</label>
- <input type="text" name="name" id="name" value="<?php ?>" />
- </div>
- <div class="form_row">
- <label for="company">Company</label>
- <input type="text" name="company" id="company" value="<?php ?>" />
- </div>
- <div class="form_row">
- <input type="submit"" name="submit" value="submit" id="submit_form" />
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement