如何在 mysqli 和 php 中保存引导程序 2 或 3 个导航选项卡内容?

纳根德拉·库马尔

我已经写了引导程序导航选项卡和一些信息在写每个选项卡以及如何保存每个选项卡信息将如何保存在 mysqli 中?

我已经尝试过但不起作用这是我的代码显示

<!-- Material Purchase Div-->        
            <div class="row">
               <div class="col-lg-12">
                  <div class="card-box">
                     <h4 class="header-title m-t-0 m-b-30">Material Management</h4>
                     <ul class="nav nav-tabs">
                        <li class="nav-item">
                           <a href="#quote" data-toggle="tab" aria-expanded="true" class="nav-link active">
                           Quotes
                           </a>
                        </li>
                        <li class="nav-item">
                           <a href="#purchase" data-toggle="tab" aria-expanded="false" class="nav-link">
                           Purchases
                           </a>
                        </li>
                        <li class="nav-item">
                           <a href="#usage" data-toggle="tab" aria-expanded="false" class="nav-link">
                           Usage
                           </a>
                        </li>
                     </ul>
                     <div class="tab-content">
                        <div class="tab-pane fade show active" id="quote">
                           <i class="mdi mdi-plus"><button type="button" class='addmore'>Add More</button></i>
                           <form id='students' method='post' name='students' action='index.php'>

                              <table border="1" cellspacing="0" class="table-responsive">
                                <tr>
                                  <th><input class='check_all' type='checkbox' onclick="select_all()"/></th>
                                  <th>S.No</th>
                                  <th>Q.No</th>
                                  <th>Item Name</th>
                                  <th>Categories</th>
                                  <th>Brand</th>
                                  <th>Qty</th>
                                  <th>Rate</th>
                                  <th>Amount</th>
                                  <th>Quote Pic</th>
                                  <th>Others</th>
                                </tr>
                                <tr>
                                  <td><input type='checkbox' class='case'/></td>
                                  <td><span id='snum'>1</span></td>
                                  <td><span id='qnum'>1</span></td>
                                  <td><input type='text' id='item_name' name='item_name[]'/></td>
                                  <td><input type='text' id='categories' name='categories[]'/></td>
                                  <td><input type='text' id='brand' name='brand[]'/></td>
                                  <td width="10%"><input type='text' id='qty' name='qty[]'/> </td>
                                  <td width="10%"><input type='text' id='rate' name='rate[]'/></td>
                                  <td width="10%"><input type='text' id='amount' name='amount[]'/> </td>
                                  <td width="10%"><input type='text' id='qpic' name='qpic[]'/> </td>
                                  <td width="10%"><input type='text' id='others' name='others[]'/> </td>
                                </tr>
                              </table>

                              <button type="button" class='delete'>- Delete</button>

                              <p>
                        </div>
                        <!--Quotes Div Close-->
                        <div class="tab-pane fade" id="purchase">
                           <div class="row">
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-4" class="control-label">S.No</label>
                                    <input type="text" class="form-control" id="field-4" placeholder="1">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-4" class="control-label">Q.No</label>
                                    <input type="text" class="form-control" id="field-4" placeholder="1">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-4" class="control-label">Itemname</label>
                                    <input type="text" class="form-control" id="field-4" placeholder="Boston">
                                 </div>
                              </div>
                              <div class="col-md-2">
                                 <div class="form-group">
                                    <label for="field-5" class="control-label">Categories</label>
                                    <input type="text" class="form-control" id="field-5" placeholder="categories">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-6" class="control-label">Brand</label>
                                    <input type="text" name="country" id="autocomplete-ajax" class="form-control" autocomplete="off">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-4" class="control-label">Qty</label>
                                    <input type="text" class="form-control" id="field-4" placeholder="1">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-5" class="control-label">Rate</label>
                                    <input type="text" class="form-control" id="field-5" placeholder="1234.00">
                                 </div>
                              </div>
                              <div class="col-md-2">
                                 <div class="form-group">
                                    <label for="field-6" class="control-label">Amount</label>
                                    <input type="text" class="form-control" id="field-6" placeholder="123456">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-6" class="control-label">Inv. Pic</label>
                                    <input type="file" class="filestyle" data-input="false" data-buttonname="btn-secondary">
                                 </div>
                              </div>
                              <div class="col-md-1">
                                 <div class="form-group">
                                    <label for="field-6" class="control-label">Others</label>
                                    <input type="text" class="form-control" id="field-6" placeholder="123456">
                                 </div>
                              </div>
                           </div>
                           <!-- row-->       
                        </div>
                        <!-- Purchase Div Close-->
                        <div class="tab-pane fade" id="usage">
                           <div class="row">
                              <!-- Inline Form -->
                              <div class="col-md-12">
                                 <div class="card-box">
                                    <h4 class="m-t-0 header-title"></h4>
                                    <div class="row">
                                       <div class="col-md-1">
                                          <div class="form-group">
                                             <label for="field-4" class="control-label">S. No. </label>
                                             <input type="text" class="form-control" id="field-4" placeholder="1">
                                          </div>
                                       </div>
                                       <div class="col-md-4">
                                          <div class="form-group">
                                             <label for="field-5" class="control-label">Item Name </label>
                                             <input type="text" class="form-control" id="field-5" placeholder="Item Name">
                                          </div>
                                       </div>
                                       <div class="col-md-1">
                                          <div class="form-group">
                                             <label for="field-6" class="control-label">Qty</label>
                                             <input type="text" class="form-control" id="field-4" placeholder="1">
                                          </div>
                                       </div>
                                       <div class="col-md-6">
                                          <div class="form-group">
                                             <label for="field-6" class="control-label">Usage For </label>
                                             <textarea class="form-control" rows="5"></textarea>
                                          </div>
                                       </div>
                                    </div>
                                    <!--row-->
<button type="submit" name='submit' value='submit' class="btn btn-purple waves-effect waves-light pull-right">Submit</button>
                                 </div>
                                 <!--end card box-->
                              </div>
                              <!--end col-md-12-->
                           </div>
                           <!-- end row / End Inline form-->        
                        </div>
                        <!-- Usage Div-->
                     </div>
                     <!-- Tab Content-->
                  </div>
                  <!-- Close card-box -->
               </div>
               <!--col-lg-12-->
            </div>


mysqli code like this 



    $uinfo = "INSERT INTO `quotes`(`customer_name`, `customer_email`, `customer_mobile`, `customer_password`, 
        `customer_area`, `created_at`, `c_verify`, `status`) values ('$name','$email','$phone','$pass','$pin',now(),'$verification',0)";
            $uresult = $conn->query($uinfo);


            $uinfo = "INSERT INTO `purchase`(`customer_name`, `customer_email`, `customer_mobile`, `customer_password`, 
        `customer_area`, `created_at`, `c_verify`, `status`) values ('$name','$email','$phone','$pass','$pin',now(),'$verification',0)";
            $uresult = $conn->query($uinfo);

            $uinfo = "INSERT INTO `usage`(`customer_name`, `customer_email`, `customer_mobile`, `customer_password`, 
        `customer_area`, `created_at`, `c_verify`, `status`) values ('$name','$email','$phone','$pass','$pin',now(),'$verification',0)";
            $uresult = $conn->query($uinfo);

这实际上是我在这 3 个导航中编写了代码我已经编写了每个导航选项卡,每个选项卡都有addrows 我编写了用于插入每个选项卡内容值的代码,但没有插入

万能资讯

首先,您可以为页面创建一个表,然后您可以编写查询并将数据库值更新为该表

例如,我将为您的页面创建一个表格

看起来像这样

$daily_reports = "INSERT INTO `daily_report`(`dr_id`,`mq_id`, `mp_id`, `mu_id`) VALUES (NULL,'$qid','$puid','$usage');


here $qid = Your Quotations id 
     $puid = your purchase id
     $usage = Your Usage id 

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Jinja2和Flask:“引导程序”选项卡仅显示第一个选项卡的内容,而不显示其余选项卡的内容

如何在引导程序3中使导航选项卡水平滚动?

Bootstrap:如何通过单击单个选项卡来显示2个选项卡内容?

如何禁用选项卡页眉和引导中的按钮导航

阻止在引导程序3中显示选项卡内容?

如何使用PHP在while循环中填充引导导航选项卡上的数据

jquery 选项卡 - 在选项卡内的导航中保存选项卡内容

php和mysql用bootstrap 3创建选项卡

在Ionic 2中,如何在单击另一个选项卡菜单应用程序图标时隐藏一个选项卡?

如何在单页响应中在引导程序 3 中执行 2 个导航栏

如何使用引导程序 4.x 使用一个选项卡更改两个选项卡容器的内容?

如何在PHP和Mysqli中插入日期

引导多个导航选项卡内容

如何在 Laravel 应用程序中保存一个简单的 PHP 应用程序?

如何在导航选项卡引导程序 UI(angularjs)中将文本与顶部对齐?

使用json和php添加引导程序选项卡的问题

如何使用Angular和Bootstrap中的“全部”选项卡进行选项卡导航?

如何在PHP和MYSQL中保留内容的格式?

如何在IntelliJ中保存打开的选项卡组?

如何使用MYSQLi和PHP显示信息?

PHP和Mysqli如何回声换行

(IOS)TabBarController,仅修复了3个选项卡和选项卡(更多)

如何在使用jQuery单击特定链接后打开引导导航选项卡的特定选项卡?

如何在引导程序的左侧,中央和右侧设置3个图像

如何在php mysqli中分别保存图像和文本

如何在 PHP 和 MySQL 中联合 2 个表?

如何在导航和选项卡控制器中正确添加UITableView?

如何在Android Studio的同一活动中隐含导航抽屉和滑动选项卡?

如何在react-native-router-flux中组合选项卡和导航栏?