Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.34 KB | None | 0 0
  1. <div class="col-12 col-sm-12 col-lg-12">
  2. <form role="form" id="feedbackForm" method="POST">
  3. <div class="col-lg-6">
  4. <div class="form-group">
  5. <label class="control-label" for="textinput">First Name<span class="required">*</span></label>
  6. <input type="text" class="form-control required" id="first_name" name="first_name" placeholder="Enter your First Name"/>
  7. <span class="help-block" style="display: none;">Please enter your first name.</span>
  8. </div>
  9. <div class="form-group">
  10. <label class="control-label" for="textinput">Last Name<span class="required">*</span></label>
  11. <input type="text" class="form-control" id="last_name" name="last_name" placeholder="Enter your Last Name"/>
  12. <span class="help-block" style="display: none;">Please enter your last name.</span>
  13. </div>
  14. <div class="form-group">
  15. <label class="control-label" for="textinput">Email Address<span class="required">*</span></label>
  16. <input type="email" class="form-control" id="email" name="email" placeholder="Enter your email address"/>
  17. <span class="help-block" style="display: none;">Please enter a valid e-mail address.</span>
  18. </div>
  19. <div class="form-group">
  20. <label class="control-label" for="textinput">Company Name</label>
  21. <input type="email" class="form-control" id="company_name" name="company_name" placeholder="Enter your company name"/>
  22. </div>
  23. <div class="form-group">
  24. <label class="control-label" for="textinput">Message<span class="required">*</span></label>
  25. <textarea rows="10" cols="100" class="form-control" id="message" name="message" placeholder="Enter your message"></textarea>
  26. <span class="help-block" style="display: none;">Please enter a message.</span>
  27. </div>
  28. </div>
  29. <div class="col-lg-6">
  30. <div class="form-group">
  31. <label for="selectbasic">How did you hear about us?</label>
  32. <select id="selectbasic" name="selectbasic" class="form-control">
  33. <option>Select</option>
  34. <option value="Search Engine">Search engine</option>
  35. <option value="Microsoft DPE">Microsoft DPE</option>
  36. <option value="Microsoft Event">Microsoft event</option>
  37. <option value="Social Media">Social media</option>
  38. <option value="Word of Mouth">Word of mouth</option>
  39. <option value="Other">Other</option>
  40. </select>
  41. </div>
  42. <div class="checkbox">
  43. <label>
  44. <input type="checkbox" id="emailUpdates" name="emailUpdates" value="Yes"> Please keep me informed of kinectAPI product updates and news
  45. </label>
  46. </div>
  47. <img id="captcha" src="library/vender/securimage/securimage_show.php" alt="CAPTCHA Image" />
  48. <a href="#" onclick="document.getElementById('captcha').src = 'library/vender/securimage/securimage_show.php?' + Math.random(); return false" class="btn btn-green btn-sm">Show a Different Image</a><br/>
  49. <div class="form-group" style="margin-top: 10px;">
  50. <input type="text" class="form-control" name="captcha_code" id="captcha_code" placeholder="For security, please enter the code displayed in the box." />
  51. <span class="help-block" style="display: none;">Please enter the code displayed within the image.</span>
  52. </div>
  53.  
  54. <span class="help-block" style="display: none;">Please enter a the security code.</span>
  55. <button type="submit" id="feedbackSubmit" class="btn btn-purple btn-md message-btn">Submit Message</button>
  56. </div>
  57. </form>
  58.  
  59. <?php
  60.  
  61. // SUBSCRIBE TO MAILING LIST OPTION - ADD TO MAILCHIMP USING API
  62. if ($_POST['emailUpdates'] == 'Yes')
  63. {
  64. // Include Mailchimp API class
  65. require_once('MCAPI.class.php');
  66.  
  67. // Your API Key: http://admin.mailchimp.com/account/api/
  68. $api = new MCAPI('feaf699f7a15c1ca27f6903152d4a3f1-us3');
  69.  
  70. // Your List Unique ID: http://admin.mailchimp.com/lists/ (Click "settings")
  71. $list_id = "69010111da";
  72.  
  73. // Variables in your form that match up to variables on your subscriber
  74. // list. You might have only a single 'name' field, no fields at all, or more
  75. // fields that you want to sync up.
  76. $merge_vars = array(
  77. 'FNAME' => $_POST['first_name'],
  78. 'LNAME' => $_POST['last_name']
  79. );
  80.  
  81. // SUBSCRIBE TO LIST
  82. if ( $api->listSubscribe($list_id, $_POST['email'], $merge_vars) === true ){
  83. $mailchimp_result = 'Success! Check your email to confirm sign up.';
  84. } else {
  85. $mailchimp_result = 'Error: ' . $api->errorMessage;
  86. }
  87. }
  88.  
  89. ?>
  90. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement