data - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of data.php
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>1st Step:Incoming Lead Detail</title>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <link rel="stylesheet" href="css/bootstrap.min.css" />
- <link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
- <link rel="stylesheet" href="css/datepicker.css" />
- <link rel="stylesheet" href="css/unicorn.main.css" />
- <link rel="stylesheet" href="css/select2.css" />
- <!--<link rel="stylesheet" href="css/unicorn.grey.css" class="skin-color" /> -->
- </head>
- <body>
- <div class="span20" id="uscontent">
- <div class="widget-box">
- <div class="widget-title">
- <span class="icon">
- <i class="icon-th-list"></i>
- </span>
- <h5>Create New Lead</h5>
- </div>
- <div class="widget-content">
- <form id='form_add_member' name='form_add_member'>
- <table>
- <tr id="hidethis">
- <td>
- <label class="control-label">Country*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="country" id="country" width="200" style="width: 200px">
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">Contact*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="phone" name="phone" required="required" onchange="getMember();" />
- </div>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="hidden" name="code" width="100" id="code" style="width:100px" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">Donor First Name*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="fname" name="fname" required="required" />
- </div>
- </td>
- <td>
- <label class="control-label">Middle Name</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="mname" name="mname" />
- </div>
- </td>
- <td>
- <label class="control-label">Last Name</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="lname" name="lname" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">PostCode*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="PostCode" name="PostCode" required="required" />
- </div>
- </td>
- <td>
- <label class="control-label">City*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="City" name="City" required="required" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">House No*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="House_No" name="House_No" required="required" />
- </div>
- </td>
- <td>
- <label class="control-label">House Name*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="House_Name" name="House_Name" required="required" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">Adress Line 1*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="Adress_Line1" name="Adress_Line1" required="required" />
- </div>
- </td>
- <td>
- <label class="control-label">Adress Line 2</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="Adress_Line2" name="Adress_Line2" />
- </div>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="hidden" id="address" name="address" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">Donor Email</label>
- </td>
- <td valign="top" style="padding: 8px;">
- <div class="controls">
- <input type="text" id="email" name="email" />
- </div>
- </td>
- <td>
- <label class="control-label">Alternate Number</label>
- </td>
- <td valign="top" style="padding: 8px;">
- <div class="controls">
- <input type="text" name="phonealt" width="100%" id="phonealt" style="width:200px" />
- </div>
- </tr>
- <tr>
- </td>
- <td>
- <label class="control-label">Sewa Type*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="type_sewa" id="type_sewa" required="required" width="200" style="width: 200px">
- <option>Select</option>
- <option value="CS">Child Sponsorship</option>
- <option value="RS">Room Sewa</option>
- <option value="O">Others</option>
- <option value="CSR">Child Sponsorship Recurring</option>
- <option value="RSR">RoomSewa Recurring</option>
- <option value="OR">Others-Recurring</option>
- <option value="TAT">TAT</option>
- <option value="TATR">TAT Recurring</option>
- </select>
- </div>
- </td>
- <td>
- <label class="control-label">Reference*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="reference" id="reference" required="required" width="200" style="width: 200px">
- <option></option>
- <option value="Social Media">Social Media</option>
- <option value="Direct Contact">Direct Contact</option>
- <option value="BaruSahib Visit">Baru Sahib Visit</option>
- <option value="Guru Ki Kashi Visit">Guru Ki Kashi Visit</option>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <label class="control-label">Gift Declaration Signed*</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="Gift_Declaration_Signed" id="Gift_Declaration_Signed" required="required" width="200" style="width: 200px">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </select>
- </div>
- </td>
- <td>
- <label class="control-label">Bank Reference</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="Bank_Reference" id="Bank_Reference" required="required" width="200" style="width: 200px">
- <option>Select</option>
- <option value="ETSAccount">ETSAccount</option>
- <option value="General">General</option>
- </select>
- </div>
- </td>
- <td>
- <label class="control-label">BankDetails</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" id="BankDetails" name="BankDetails" />
- </div>
- </td>
- </tr>
- </table>
- <table>
- <tr>
- <td>
- <label class="control-label">Donor CallerName</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <select name="cname" id="cname" width="200" style="width: 200px">
- </select>
- </div>
- </td>
- <td>
- <label class="control-label">Call Date</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="date" data-date-format="yyyy-mm-dd" name="caller_date" id="caller_date" />
- </div>
- </td>
- </table>
- <table>
- </tr>
- <tr>
- <td>
- <label class="control-label">Caller Details</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <div class="controls">
- <textarea name="address1" id="address1"></textarea>
- </div>
- </td>
- <td>
- <label class="control-label">Special Remarks</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <div class="controls">
- <textarea name="address2" id="address2"></textarea>
- </div>
- </td>
- </tr>
- </table>
- <table>
- <td>
- <label id="lbl_rec_flag" class="control-label"> Recurring Payment:</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" name="recurring_flag" id="recurring_flag" readonly />
- </div>
- </td>
- <td>
- <label id="lbl_Frequency" class="control-label">Frequency</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" name="Frequency" id="Frequency" readonly />
- </div>
- </td>
- </table>
- <table>
- <tr>
- <td>
- <label id="lbl_jd5" class="control-label">Due Date</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="text" data-date-format="yyyy-mm-dd" class="datepicker" name="duedate" id="duedate" />
- </div>
- </td>
- </tr>
- <tr style="width: 100px" ;>
- <td>
- <label class="control-label">Followup Reqd</label>
- </td>
- <td align="left">
- <INPUT TYPE="radio" NAME="Followup" VALUE="Yes" CHECKED id="self" onClick="validateDays();" />Yes</td>
- <td>
- <INPUT TYPE="radio" NAME="Followup" VALUE="No" id="gender" onClick="validateDays();">No</td>
- <tr>
- <td>
- <label id="lbl_jd3" class="control-label">Followup Date</label>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <input type="date" data-date-format="yyyy-mm-dd" name="foll_date" id="foll_date" />
- </div>
- </td>
- <td style="padding: 8px;">
- <div class="controls">
- <div class="controls">
- <textarea name="address3" id="address3"></textarea>
- </div>
- </td>
- <input type="hidden" id="memberid" name="memberid" />
- </tr>
- </tr>
- </table>
- <p align="right">* The input is mandatory.</p>
- <div class="form-actions" align="center">
- <input type="button" class="btn btn-primary" value="Update Incoming Lead" id="add" onclick="addUser(this.form);"></input>
- <!--<button class="btn btn-primary" onclick="addMember(this.form);">Add Member</button> -->
- <button type="reset" class="btn btn-primary">Cancel</button>
- </div>
- <div id='status' name='status'>
- </div>
- </form>
- </div>
- </div>
- </div>
- </body>
- <div class="span12" id="searchcontent">
- <div class="widget-box">
- <div class="widget-title">
- <span class="icon">
- <i class="icon-th-list"></i>
- </span>
- <h5>Payment History</h5>
- </div>
- <div class="widget-content">
- </div>
- </div>
- </div>
- <script src="js/jquery.min.js"></script>
- <!--<script src="js/jquery.ui.custom.js"></script> -->
- <script src="js/bootstrap.min.js"></script>
- <script src="js/bootstrap-colorpicker.js"></script>
- <script src="js/bootstrap-datepicker.js"></script>
- <script src="js/jquery.uniform.js"></script>
- <script src="js/select2.min.js"></script>
- <script src="js/unicorn.js"></script>
- <script src="js/unicorn.form_common.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#address3').hide();
- //$('#code').load('/cms_int1/php/get_code.php');
- //$('#country').load('/cms_int1/php/get_country_intl.php');
- $('#country').load('/cms_int1/php/get_country_user.php');
- //$('#countrie').load('/cms_int1/php/get_countrie_user.php');
- $('#cname').load('/cms_int1/php/getcname1.php');
- $('#lbl_jd3').show();
- $("#uid").focus();
- $('#lbl_jd3').show();
- $('#foll_date').show();
- $('#address3').show();
- var url = window.location.search.substring(1);
- var jmemberid = url.split('=');
- //alert (jmemberid[1]);
- $('#memberid').val(jmemberid[1]);
- $('#memberid').prop('readonly', true);
- //$('#code1').val(jmemberid[1]);
- //$('#code1').prop('readonly', true);
- $('#phone1').val(jmemberid[1]);
- $('#phone1').prop('readonly', true);
- $.ajax({
- url: '/cms_int1/php/get_member.php',
- dataType: 'json', //json data type
- data: {
- memberid: jmemberid[1]
- },
- success: function(response) {
- //alert('success');
- displaydata(response);
- },
- error: function(xhr, status, error) {
- var err = eval("(" + xhr.responseText + ")");
- alert(xhr.responseText);
- alert(err.Message);
- alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
- }
- });
- $.ajax({
- url: '/cms_int1/php/donorpaymenthistory.php',
- dataType: 'html', //json data type
- data: {
- memberid: jmemberid[1]
- },
- beforeSend: function() {
- $('#wait').show();
- },
- success: function(response) {
- $('#wait').hide();
- $('#searchcontent .widget-content').html(response);
- },
- error: function(xhr, status, error) {
- alert(xhr.responseText);
- var err = eval("(" + xhr.responseText + ")");
- alert(err.Message);
- }
- });
- });
- function displaydata(response) {
- if (response[0].phone == null) {
- alert('No Results Found');
- $('#foll_date').prop('readonly', false);
- $('#phone').prop('readonly', false);
- $('#Followup').hide();
- $('#lbl_jd3a').hide();
- $('#lbl_jdd3').hide();
- $('#foll_date1').hide();
- $('#lbl_jdd2').hide();
- $('#foll_date2').hide();
- $('#lbl_jdd1').hide();
- $('#foll_date3').hide();
- $('#lbl_jdc').hide();
- $('#address3').hide();
- $('#lbl_jdd4').hide();
- $('#foll_date4').hide();
- $('#lbl_jdd5').hide();
- $('#foll_date5').hide();
- $('#lbl_jdccccc').hide();
- $('#lbl_jdcccc').hide();
- $('#lbl_jdccc').hide();
- $('#lbl_jdcc').hide();
- $('#lbl_jdc').hide();
- $('#address3').hide();
- $('#address4').hide();
- $('#address6').hide();
- $('#address7').hide();
- $('#address5').hide();
- } else {
- // alert(response[0].cname);
- // $('#fname').val(response[0].fname);
- $('#phone').val(response[0].phone);
- $('#address1').val(response[0].address1);
- $('#address').val(response[0].address);
- $('#address2').val(response[0].address2);
- //$('#address3').val(response[0].address3);
- $('#address4').val(response[0].address4);
- $('#address5').val(response[0].address5);
- $('#phonealt').val(response[0].phonealt);
- $('#address6').val(response[0].address6);
- $('#address7').val(response[0].address7);
- $('#foll_date').val(response[0].foll_date);
- //$('#foll_date1').val(response[0].foll_date1);
- $('#foll_date2').val(response[0].foll_date2);
- $('#foll_date3').val(response[0].foll_date3);
- $('#foll_date4').val(response[0].foll_date4);
- $('#foll_date5').val(response[0].foll_date5);
- $('#recurring_flag').val(response[0].recurring_flag);
- $('#Frequency').val(response[0].mode);
- $('#caller_date').val(response[0].caller_date);
- $('#Followup').val(response[0].Followup);
- $('#code').val(response[0].code);
- $('#duedate').val(response[0].duedate);
- $('#email').val(response[0].email);
- $('#altemail').val(response[0].altemail);
- $('#fname').val(response[0].First_Name);
- // $('#cname').val(response[0].cname);
- $('#s2id_cname').select2('val', response[0].cname);
- $('#mname').val(response[0].Middle_Name);
- $('#lname').val(response[0].Last_Name);
- $('#Tittle').val(response[0].Tittle);
- $('#House_No').val(response[0].House_No);
- $('#House_Name').val(response[0].House_Name);
- $('#Adress_Line1').val(response[0].Adress_Line1);
- $('#Adress_Line2').val(response[0].Adress_Line2);
- $('#City').val(response[0].City);
- $('#PostCode').val(response[0].PostCode);
- // $('#Gift_Declaration_Signed').val(response[0].Gift_Declaration_Signed);
- //$('#Bank_Reference').val(response[0].Bank_Reference);
- $('#type_sewa').val(response[0].type_sewa).trigger('change');
- $('#s2id_country1').select2('val', response[0].country);
- $('#s2id_country').select2('val', response[0].country);
- $('#s2id_reference').select2('val', response[0].reference);
- $('#s2id_Bank_Reference').select2('val', response[0].Bank_Reference);
- //$('#country1').val(response[0].country).trigger('change');
- //$('#reference').val(response[0].reference).trigger('change');
- $('#fname1').val(response[0].fname);
- $('#phone2').val(response[0].phone);
- $('#1address1').val(response[0].address1);
- $('#1address').val(response[0].address);
- $('#1address2').val(response[0].address2);
- $('#1address3').val(response[0].address3);
- $('#foll_1date').val(response[0].foll_date);
- $('#foll_1date1').val(response[0].foll_date1);
- $('#foll_1date2').val(response[0].foll_date2);
- $('#foll_1date3').val(response[0].foll_date3);
- $('#1Followup').val(response[0].Followup);
- $('#code2').val(response[0].code);
- $('#email1').val(response[0].email);
- //$('#code').val(response[0].code);
- $('#type_sewa1').val(response[0].type_sewa);
- $('#country11').val(response[0].country);
- $('#address2').prop('readonly', true);
- // $('#s2id_BankDetails').select2('val',response[0].BankDetails);
- $('#s2id_Gift_Declaration_Signed').select2('val', response[0].Gift_Declaration_Signed);
- $('#BankDetails').val(response[0].BankDetails);
- if (response[0].Followup == 'Yes') {
- $('#lbl_jdd3').show();
- $('#foll_date1').show();
- $('#lbl_jdd2').show();
- $('#foll_date2').show();
- $('#lbl_jdd1').show();
- $('#foll_date3').show();
- $('#lbl_jdd4').show();
- $('#foll_date4').show();
- $('#lbl_jdd5').show();
- $('#foll_date5').show();
- $('#lbl_jdccccc').show();
- $('#lbl_jdcccc').show();
- $('#lbl_jdccc').show();
- $('#lbl_jdcc').show();
- $('#lbl_jdc').show();
- $('#address3').show();
- $('#address4').show();
- $('#address6').show();
- $('#address7').show();
- $('#address5').show();
- $('#Followup').show();
- $('#lbl_jd3a').show();
- $('#lbl_jdd3').show();
- $('#foll_date1').show();
- $('#lbl_jdd2').show();
- $('#foll_date2').show();
- $('#lbl_jdd1').show();
- $('#foll_date3').show();
- $('#lbl_jdc').show();
- } else {
- $('#lbl_jd3a').hide();
- $('#lbl_jdd3').hide();
- $('#foll_date1').hide();
- $('#lbl_jdd2').hide();
- $('#foll_date2').hide();
- $('#lbl_jdd1').hide();
- $('#foll_date3').hide();
- $('#lbl_jdc').hide();
- $('#lbl_jdd4').hide();
- $('#foll_date4').hide();
- $('#lbl_jdd5').hide();
- $('#foll_date5').hide();
- $('#lbl_jdccccc').hide();
- $('#lbl_jdcccc').hide();
- $('#lbl_jdccc').hide();
- $('#lbl_jdcc').hide();
- $('#lbl_jdc').hide();
- $('#address3').hide();
- $('#address4').hide();
- $('#address6').hide();
- $('#address7').hide();
- $('#address5').hide();
- }
- //$('#code').val(response[0].code);
- }
- }
- function validateDays() {
- if (document.getElementById('self').checked) {
- //alert('cggx2333');
- $('#lbl_jd3').show();
- // document.getElementById("foll_date").disabled = false;
- $('#foll_date').show();
- // $('#foll_date').prop('readonly', false);
- $('#address3').show();
- } else if (document.getElementById('gender').checked) {
- //alert('cggx');
- $('#address3').hide();
- $('#lbl_jd3').hide();
- $('#foll_date').hide();
- $('#address3').hide();
- //$('#foll_date').prop('readonly', true);
- }
- }
- function loadcode() {
- var country = document.getElementById("country").value;
- //alert(country);
- $.ajax({
- url: '/cms_int1/php/getcode.php',
- dataType: 'json', //json data type
- type: 'GET',
- data: {
- country: country
- },
- success: function(response) {
- //alert(response[0].code);
- $('#code').val(response[0].code);
- },
- error: function(response) {
- $('#status').html("<font color=\"red\">" + response + "</font>");
- }
- });
- //alert(colname);
- //$('#code').load('/cms_int1/php/get_code.php?country='+country);
- }
- function getMember() {
- //alert('success');
- var jphone = document.getElementById("phone").value;
- var jcode = document.getElementById("code").value;
- //alert(jphone);alert(jcode);
- $.ajax({
- url: '/cms_int1/php/get_phone.php',
- dataType: 'json', //json data type
- data: {
- phone: jphone,
- code: jcode
- },
- success: function(response) {
- if (response[0].phone === null) {
- //alert ('NO RECORD FOUND !');
- } else {
- //alert(response[0].phone);
- alert('Lead already exists');
- }
- },
- error: function(response) {
- errordata(response);
- }
- });
- }
- function addUser(form) {
- var jphone = form.phone.value;
- var jemail = form.email.value;
- var jfname = form.fname.value;
- var jaddress = form.address.value;
- var jaddress1 = form.address1.value;
- var jaddress2 = form.address2.value;
- var jaddress3 = form.address3.value;
- var jtype_sewa = form.type_sewa.value;
- var jcountry = form.country.value;
- var jFollowup = $('input:radio[name=Followup]:checked').val();
- var jfoll_date = form.foll_date.value;
- var jcode = form.code.value;
- var jcname = form.cname.value;
- var jphonealt = form.phonealt.value;
- var jreference = form.reference.value;
- var jcaller_date = form.caller_date.value;
- var jmname = form.mname.value;
- var jlname = form.lname.value;
- var jHouse_No = form.House_No.value;
- var jHouse_Name = form.House_Name.value;
- var jAdress_Line1 = form.Adress_Line1.value;
- var jAdress_Line2 = form.Adress_Line2.value;
- var jCity = form.City.value;
- var jGift_Declaration_Signed = form.Gift_Declaration_Signed.value;
- var jBank_Reference = form.Bank_Reference.value;
- // alert(jcname);
- var jPostCode = form.PostCode.value;
- var jBankDetails = form.BankDetails.value;
- var jmemberid = form.memberid.value;
- var jduedate = form.duedate.value;
- document.getElementById("add").disabled = true;
- $.ajax({
- url: '/cms_int1/php/update_lead.php',
- dataType: 'html', //json data type
- type: 'POST',
- data: {
- phone: jphone,
- email: jemail,
- fname: jfname,
- address: jaddress,
- address1: jaddress1,
- address2: jaddress2,
- type_sewa: jtype_sewa,
- country: jcountry,
- Followup: jFollowup,
- foll_date: jfoll_date,
- code: jcode,
- cname: jcname,
- phonealt: jphonealt,
- reference: jreference,
- caller_date: jcaller_date,
- mname: jmname,
- lname: jlname,
- House_No: jHouse_No,
- House_Name: jHouse_Name,
- Adress_Line1: jAdress_Line1,
- Adress_Line2: jAdress_Line2,
- City: jCity,
- Gift_Declaration_Signed: jGift_Declaration_Signed,
- Bank_Reference: jBank_Reference,
- PostCode: jPostCode,
- BankDetails: jBankDetails,
- memberid: jmemberid,
- address3: jaddress3,
- duedate: jduedate
- },
- success: function(response) {
- //alert('succcesssssssssss');
- $('#status').html("<font color=\"green\" style=\"font-size:20px;\">" + response + "</font>");
- //window.location.reload(true);
- return false;
- },
- error: function(response) {
- alert('failure');
- $('#status').html("<font color=\"red\">" + response + "</font>");
- }
- });
- }
- </script>
- </html>
File Description
- data
- PHP Code
- 16 Aug-2019
- 25.92 Kb
You can Share it:
Latest PHP Pastes