Posts

query

  SELECT   d .aggregator_id ,   d .model_id ,   CASE   WHEN   COUNT ( r .tbl_demo_p_id )   =   d .quantity   THEN   'Full'   ELSE   'Empty'   END   AS   status   FROM   tbl_demo   d   LEFT   JOIN   tbl_demo_refer   r   ON   d .id   =   r .tbl_demo_p_id   WHERE   d .aggregator_id   =   1   AND   d .model_id   =   2   GROUP   BY   d .aggregator_id ,   d .model_id ,   d .quantity ; SELECT      d.aggregator_id,     d.model_id,     CASE          WHEN COUNT(r.tbl_demo_p_id) = d.quantity THEN 'Full'         ELSE 'Empty'     END AS status FROM      tbl_demo d LEFT JOIN      tbl_demo_refer r ON d.id = r.tbl_demo_p_id WHERE      d.aggregator_id = <aggregator_id_value>     AND d.model_id = <model_id_value>     AND r.car_no = '<car_no_value>' GROUP BY      d.aggregator_id, d.model_id, d.quantity;
 index.php <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <title>Dynamic Page Loading with Login, Active Page, and Completed Pages</title>   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">   <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>   <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>   <style>     #content-container {       margin: 10px;       padding: 10px;       border: 1px solid #ddd;     }     #page-list {       list-style: none;       padding: 0;     }     #page-list li {       margin-bottom: 5px;       cursor: pointer;     }     #page-list li.active {       background-color: #007bff;       color: #fff;  

Select one checkbox at a time from group of checkbox

Select one checkbox at a time from group of checkbox <div class="btn-group" role="group" onclick="selectOne(event)">   <input type="checkbox" class="btn-check" id="btncheck1" value='1' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck1">Checkbox 1</label>   <input type="checkbox" class="btn-check" id="btncheck2" value='2' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck2">Checkbox 2</label>   <input type="checkbox" class="btn-check" id="btncheck3" value='2' autocomplete="off">   <label class="btn btn-outline-primary" for="btncheck3">Checkbox 3</label> </div> <script> function selectOne(event) {     const clickedElement = event.target;

Form Validation

Form Validation <!DOCTYPE html> <html> <head>     <title>Form Validation</title>      </head> <body>     <form id="loginForm">         <input type="text" name="username" required placeholder="Username" data-error-msg="Username is required"><br><br>         <input type="password" name="password" required placeholder="Password" data-error-msg="Password is required"><br><br>         <input type='text' class='form-control' data-error-msg="Data required" required>         <!-- Additional form fields -->         <button type="button" id="submitForm">Submit</button>     </form>     <div id="result"></div> </body> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>     <script>

How to seperate character from string in php

?   1 2 3 4 5 6 7 8 9 $string = "abcdef" ; $result =[]; $strlen = strlen ( $string ); for ( $i =0; $i < $strlen ; $i ++) {      $result [ $i ]= $string [ $i ];   } print_r( $result );     $string = "abcdef"; $result=[]; $strlen = strlen($string); for($i=0;$i<$strlen;$i++) { $result[$i]=$string[$i]; } print_r($result);

Show json data as drop-down menu

?   001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 <!DOCTYPE html> < html >   < head >    < title >Webslesson Tutorial | Search HTML Table Data by using JQuery</ title >    < script src = " https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js " ></ script >    < link rel = "stylesheet" href = " https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min

Multiple Images Uploads Step by Step

?   1 < input type = "file" name = "image[]" id = "form-field-2" placeholder = "Select News Image For Uploading" class = "col-xs-10 col-sm-5" required multiple = "multiple" />     <input type="file" name="image[]" id="form-field-2" placeholder="Select News Image For Uploading" class="col-xs-10 col-sm-5" required multiple="multiple" /> ?   01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 <?php          include "connection.php" ; // include your database connection file                                             if (isset( $_POST [ 'submit' ]))              {                      extract( $_POST );                      $i =0;                                                            $total = c