Как отобразить данные, которые приходят из сценария Java?

Как отобразить данные, которые приходят из сценария Java?

У меня проблема при отображении данных из Java Script на страницу php.

Мой файл member_list.php выглядит так

 {amp}lt;?php include "../connection.php"; extract($_REQUEST); $perPage = 30; // total records per page // page $conditionArr = array(); // array for condition $condition = ""; // conditions $pages = ""; // how many pages created $type = ""; $company = ""; $message = ""; $rersArr = array(); $data = array(); $templeArr = array(); if ($sabhasadnumber != "") { array_push($conditionArr, "sabhasad_number LIKE '%" . $sabhasadnumber . "%'"); } if ($Sakhe != "") { array_push($conditionArr, "sakhe_id LIKE '%" . $Sakhe . "%'"); } $sql = "SELECT * FROM members WHERE village_id = $id"; if (sizeOf($conditionArr) {amp}gt; 0) { $condition = implode(" AND ", $conditionArr); // echo $condition; $sql .= " AND $condition"; } $start = ($page - 1) * $perPage; $sql1 = mysqli_query($conn, $sql) or die(mysqli_error($conn)); $count = mysqli_num_rows($sql1); $pages = ceil($count / $perPage); $sql .= " ORDER BY members_id ASC"; $sql .= " limit $start,$perPage "; print_r($sql); ?{amp}gt; {amp}lt;tr style="display:none;"{amp}gt; {amp}lt;td colspan="5"{amp}gt; {amp}lt;input type="hidden" name="total_page" id="total_page" value="{amp}lt;?php echo $pages; ?{amp}gt;"{amp}gt; {amp}lt;input type="hidden" name="current_page" class="current_page" id="current_page" value="{amp}lt;?php echo $page; ?{amp}gt;"{amp}gt; {amp}lt;/td{amp}gt; {amp}lt;/tr{amp}gt; {amp}lt;div class="member--items"{amp}gt; {amp}lt;div class="row gutter--15 AdjustRow"{amp}gt; {amp}lt;div class="row"{amp}gt; {amp}lt;?php $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) {amp}gt; 0) { while ($row = mysqli_fetch_array($result)) { ?{amp}gt; {amp}lt;div class="col-md-3 col-xs-6 col-xxs-12" style="height:300px"{amp}gt; {amp}lt;div class="member--item "{amp}gt; {amp}lt;?php $imgurl = ""; if ($row["image"] != "") { $imgurl = "../admin/uploads/" . $row["image"]; } else { $imgurl = "../admin/uploads/default_profile.jpg"; } ?{amp}gt; {amp}lt;div class="img img-circle"{amp}gt; {amp}lt;a href="sabhasad_family.php?id={amp}lt;?php echo $row['sabhasad_number']; ?{amp}gt;" class="btn-link"{amp}gt; {amp}lt;img src="{amp}lt;?php echo $imgurl; ?{amp}gt;" alt="Как отобразить данные, которые приходят из сценария Java?" style="height: 150px; width: 150px;"{amp}gt;{amp}lt;/a{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div class="name"{amp}gt; {amp}lt;h3 class="h fs--12"{amp}gt; {amp}lt;p{amp}gt; {amp}lt;a href="sabhasad_family.php?id={amp}lt;?php echo $row['sabhasad_number']; ?{amp}gt;"{amp}gt; {amp}lt;?php echo $row['surname'] ." " ; echo $row['name'] ." "; echo $row['middle_name'] ." "; ?{amp}gt;{amp}lt;/a{amp}gt;{amp}lt;/p{amp}gt; {amp}lt;/h3{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div class="activity"{amp}gt; {amp}lt;p{amp}gt;સભાસદ નંબર : {amp}lt;?php echo $row['sabhasad_number']; ?{amp}gt; {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;?php } } else { ?{amp}gt; {amp}lt;?php } ?{amp}gt; 

мой member_list.js выглядит так

 var page = 1; var total_page = ""; function getresult(searches) { $.ajax({ url: "process/member_list.php", type: "post", data: { sabhasadnumber: $("#sabhasadnumber").val(), id: $("#village_id").val(), Sakhe: $("#Sakhe").val(), page: page }, success: function (data) { console.log(data); $("#mlist").html(data); if (searches === true) { $("#mlist").html(data); } else { $("#mlist").append(data); } } }); } $(document).ready(function () { getresult(false); $(window).scroll(function () { if ($(window).scrollTop() {amp}gt;= $(document).height() - $(window).height() - 5) { if ($(".current_page:last").val() {amp}lt;= $("#total_page").val()) { page = parseInt($(".current_page:last").val())   1; getresult(false); } } }); $("#fsubmit").click(function () { page = 1; getresult(true); }); $("#freset").click(function () { $("#subcategory").val(""); page = 1; getresult(true); }); }); 

Я отображаю данные на village.php в этом теге

{amp}lt;div id="memeberlist" name="memeberlist"{amp}gt;{amp}lt;/div{amp}gt;

Проблема в том, что данные поступают. Я вижу в консоли, но он не отображается на странице {amp}lt;div id="memeberlist" name="memeberlist"{amp}gt;{amp}lt;/div{amp}gt; в {amp}lt;div id="memeberlist" name="memeberlist"{amp}gt;{amp}lt;/div{amp}gt; .

Пожалуйста, помогите мне.

Мой village.php выглядит так

 {amp}lt;?php include 'header.php'; include 'connection.php'; $id = $_GET['id']; $totalvillagemember = mysqli_num_rows(mysqli_query($conn, "select members_id from members WHERE village_id = $id")); $villagename = mysqli_query($conn, "SELECT name from village WHERE village_id = $id"); $row1 = mysqli_fetch_array($villagename); ?{amp}gt; {amp}lt;body{amp}gt; {amp}lt;!-- Preloader Start --{amp}gt; {amp}lt;div id="preloader"{amp}gt; {amp}lt;div class="preloader--inner"{amp}gt;{amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Preloader End --{amp}gt; {amp}lt;!-- Wrapper Start --{amp}gt; {amp}lt;div class="wrapper"{amp}gt; {amp}lt;!-- Header Section Start --{amp}gt; {amp}lt;!-- Header Section End --{amp}gt; {amp}lt;!-- Page Header Start --{amp}gt; {amp}lt;div class="page--header pt--60 pb--60 text-center" data-bg-img="img/page-header-img/bg.jpg" data-overlay="0.85"{amp}gt; {amp}lt;div class="container"{amp}gt; {amp}lt;div class="title"{amp}gt; {amp}lt;h2 class="h1 text-white"{amp}gt;સભ્યો{amp}lt;/h2{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;ul class="breadcrumb text-gray ff--primary"{amp}gt; {amp}lt;li{amp}gt;{amp}lt;a href="home-1.html" class="btn-link"{amp}gt;હોમ{amp}lt;/a{amp}gt;{amp}lt;/li{amp}gt; {amp}lt;li class="active"{amp}gt;{amp}lt;span class="text-primary"{amp}gt;સભ્યો{amp}lt;/span{amp}gt;{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Page Header End --{amp}gt; {amp}lt;!-- Page Wrapper Start --{amp}gt; {amp}lt;section class="page--wrapper pt--80 pb--20"{amp}gt; {amp}lt;div class="container"{amp}gt; {amp}lt;div class="row"{amp}gt; {amp}lt;!-- Main Content Start --{amp}gt; {amp}lt;div class="main--content col-md-8 pb--60" data-trigger="stickyScroll"{amp}gt; {amp}lt;div class="main--content-inner"{amp}gt; {amp}lt;!-- Filter Nav Start --{amp}gt; {amp}lt;div class="filter--nav clearfix"{amp}gt; {amp}lt;div class="filter--link"{amp}gt; {amp}lt;h2 class=""{amp}gt;ગામ : {amp}lt;?php echo $row1['name']; ?{amp}gt;{amp}lt;/h2{amp}gt; {amp}lt;h2 class=""{amp}gt;બધા સભ્ય :{amp}lt;?php echo number_format($totalvillagemember) ?{amp}gt;{amp}lt;/h2{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div id="mlist" name="mlist"{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;script src="myjs/member_list.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;!-- Page Count End --{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Main Content End --{amp}gt; {amp}lt;!-- Main Sidebar Start --{amp}gt; {amp}lt;div class="main--sidebar col-md-4 pb--60" data-trigger="stickyScroll"{amp}gt; {amp}lt;!-- Widget Start --{amp}gt; {amp}lt;div class="widget"{amp}gt; {amp}lt;h2 class="h4 fw--700 widget--title"{amp}gt;સભ્ય શોધો{amp}lt;/h2{amp}gt; {amp}lt;!-- Buddy Finder Widget Start --{amp}gt; {amp}lt;div class="buddy-finder--widget"{amp}gt; {amp}lt;form name="village" id="village"{amp}gt; {amp}lt;div class="row"{amp}gt; {amp}lt;div class="col-xs-6 col-xxs-12"{amp}gt; {amp}lt;div class="form-group"{amp}gt; {amp}lt;label{amp}gt; {amp}lt;span class="text-darker ff--primary fw--500"{amp}gt;શોધી રહ્યો છુ{amp}lt;/span{amp}gt; {amp}lt;select name="gender" id="gender" class="form-control form-sm" data-trigger="selectmenu"{amp}gt; {amp}lt;option value=" "{amp}gt;પસંદ કરો{amp}lt;/option{amp}gt; {amp}lt;option value="F"{amp}gt;સ્ત્રી {amp}lt;/option{amp}gt; {amp}lt;option value="M"{amp}gt;પુરુષ{amp}lt;/option{amp}gt; {amp}lt;/select{amp}gt; {amp}lt;/label{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div class="col-xs-6 col-xxs-12"{amp}gt; {amp}lt;div class="form-group"{amp}gt; {amp}lt;label{amp}gt; {amp}lt;span class="text-darker ff--primary fw--500"{amp}gt;સભાસદ નંબર{amp}lt;/span{amp}gt; {amp}lt;input type="text" name="sabhasadnumber" id="sabhasadnumber" class="form-control form-sm" placeholder="સભાસદ નંબર"{amp}gt; {amp}lt;/label{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div class="col-xs-6 col-xxs-12"{amp}gt; {amp}lt;div class="form-group"{amp}gt; {amp}lt;label{amp}gt; {amp}lt;input type="hidden" id="village_id" name="village_id" value="{amp}lt;?php echo $id; ?{amp}gt;"{amp}gt; {amp}lt;span class="text-darker ff--primary fw--500"{amp}gt;સાખે{amp}lt;/span{amp}gt; {amp}lt;select class="form-control form-sm" name="Sakhe" id="Sakhe"{amp}gt; {amp}lt;option value=""{amp}gt; સાખે પસંદ કરો {amp}lt;/option{amp}gt; {amp}lt;?php $query = mysqli_query($conn, "select * from sakhe where status = 1 order by sakhe_id asc"); while ($row = mysqli_fetch_array($query)) { echo "{amp}lt;option value = " . $row['sakhe_id'] . "{amp}gt;" . $row['name'] . "{amp}lt;/option{amp}gt;"; } ?{amp}gt; {amp}lt;/select{amp}gt; {amp}lt;/label{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;div class="col-xs-12"{amp}gt; {amp}lt;button type="button" class="btn btn-primary" id="shopsubmit" name="shopsubmit"{amp}gt; સબમિટ કરો {amp}lt;/button{amp}gt; {amp}lt;button type="button" class="btn btn-primary" id="reset" name="reset"{amp}gt; ફરીથી સેટ કરો {amp}lt;/button{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/form{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Widget End --{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Main Sidebar End --{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/section{amp}gt; {amp}lt;!-- Page Wrapper End --{amp}gt; {amp}lt;!-- Footer Section Start --{amp}gt; {amp}lt;!-- Footer Widgets End --{amp}gt; {amp}lt;!-- Footer Extra Start --{amp}gt; {amp}lt;?php include 'footer.php'; ?{amp}gt; {amp}lt;!-- Footer Section End --{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Wrapper End --{amp}gt; {amp}lt;!-- Back To Top Button Start --{amp}gt; {amp}lt;div id="backToTop"{amp}gt; {amp}lt;a href="#" class="btn"{amp}gt;{amp}lt;i class="fa fa-caret-up"{amp}gt;{amp}lt;/i{amp}gt;{amp}lt;/a{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;!-- Back To Top Button End --{amp}gt; {amp}lt;!-- ==== Plugins Bundle ==== --{amp}gt; {amp}lt;script src="js/plugins.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;!-- ==== Color Switcher Plugin ==== --{amp}gt; {amp}lt;script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;script src="https://malsup.github.com/jquery.form.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;!-- ==== Main Script ==== --{amp}gt; {amp}lt;script src="js/main.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;!--{amp}lt;script src="https://malsup.github.com/jquery.form.js"{amp}gt;{amp}lt;/script{amp}gt;--{amp}gt; {amp}lt;/body{amp}gt; {amp}lt;/html{amp}gt; 
Понравилась статья? Поделиться с друзьями:
JavaScript & TypeScript
Adblock
detector