Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="col-12 col-sm-12 col-lg-12">
- <form role="form" id="feedbackForm" method="POST">
- <div class="col-lg-6">
- <div class="form-group">
- <label class="control-label" for="textinput">First Name<span class="required">*</span></label>
- <input type="text" class="form-control required" id="first_name" name="first_name" placeholder="Enter your First Name"/>
- <span class="help-block" style="display: none;">Please enter your first name.</span>
- </div>
- <div class="form-group">
- <label class="control-label" for="textinput">Last Name<span class="required">*</span></label>
- <input type="text" class="form-control" id="last_name" name="last_name" placeholder="Enter your Last Name"/>
- <span class="help-block" style="display: none;">Please enter your last name.</span>
- </div>
- <div class="form-group">
- <label class="control-label" for="textinput">Email Address<span class="required">*</span></label>
- <input type="email" class="form-control" id="email" name="email" placeholder="Enter your email address"/>
- <span class="help-block" style="display: none;">Please enter a valid e-mail address.</span>
- </div>
- <div class="form-group">
- <label class="control-label" for="textinput">Company Name</label>
- <input type="email" class="form-control" id="company_name" name="company_name" placeholder="Enter your company name"/>
- </div>
- <div class="form-group">
- <label class="control-label" for="textinput">Message<span class="required">*</span></label>
- <textarea rows="10" cols="100" class="form-control" id="message" name="message" placeholder="Enter your message"></textarea>
- <span class="help-block" style="display: none;">Please enter a message.</span>
- </div>
- </div>
- <div class="col-lg-6">
- <div class="form-group">
- <label for="selectbasic">How did you hear about us?</label>
- <select id="selectbasic" name="selectbasic" class="form-control">
- <option>Select</option>
- <option value="Search Engine">Search engine</option>
- <option value="Microsoft DPE">Microsoft DPE</option>
- <option value="Microsoft Event">Microsoft event</option>
- <option value="Social Media">Social media</option>
- <option value="Word of Mouth">Word of mouth</option>
- <option value="Other">Other</option>
- </select>
- </div>
- <div class="checkbox">
- <label>
- <input type="checkbox" id="emailUpdates" name="emailUpdates" value="Yes"> Please keep me informed of kinectAPI product updates and news
- </label>
- </div>
- <img id="captcha" src="library/vender/securimage/securimage_show.php" alt="CAPTCHA Image" />
- <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/>
- <div class="form-group" style="margin-top: 10px;">
- <input type="text" class="form-control" name="captcha_code" id="captcha_code" placeholder="For security, please enter the code displayed in the box." />
- <span class="help-block" style="display: none;">Please enter the code displayed within the image.</span>
- </div>
- <span class="help-block" style="display: none;">Please enter a the security code.</span>
- <button type="submit" id="feedbackSubmit" class="btn btn-purple btn-md message-btn">Submit Message</button>
- </div>
- </form>
- <?php
- // SUBSCRIBE TO MAILING LIST OPTION - ADD TO MAILCHIMP USING API
- if ($_POST['emailUpdates'] == 'Yes')
- {
- // Include Mailchimp API class
- require_once('MCAPI.class.php');
- // Your API Key: http://admin.mailchimp.com/account/api/
- $api = new MCAPI('feaf699f7a15c1ca27f6903152d4a3f1-us3');
- // Your List Unique ID: http://admin.mailchimp.com/lists/ (Click "settings")
- $list_id = "69010111da";
- // Variables in your form that match up to variables on your subscriber
- // list. You might have only a single 'name' field, no fields at all, or more
- // fields that you want to sync up.
- $merge_vars = array(
- 'FNAME' => $_POST['first_name'],
- 'LNAME' => $_POST['last_name']
- );
- // SUBSCRIBE TO LIST
- if ( $api->listSubscribe($list_id, $_POST['email'], $merge_vars) === true ){
- $mailchimp_result = 'Success! Check your email to confirm sign up.';
- } else {
- $mailchimp_result = 'Error: ' . $api->errorMessage;
- }
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement