lundi 2 octobre 2017

From data not getting submitted

HTML From data not getting submitted not even the PHP page is being loaded where a form is there. In below Code, I have used From above the table from where I will have to select table's row using checklist after clicking submit button, but current pade is not even being load to show me even error and blank page itself.

<html>
 <head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>





<style media="screen">

 #listdiv1{
 position: relative;
 display:block;
 left:15%;
 }
body{
background-color: rgb(231, 187, 82);
 }
th{
font-variant: small-caps;
font-weight: lighter;
color:red;

}
 </style>
</head>
<body >
<div id="listdiv1" style="background-
color:red;width:1400px;height:900px;position:relative;top:20px;">

  <div id="listDivIn2" style="background-color:blue;width:1400px;height:900px;display:inline-block;position: absolute;">
      <h1 style="margin-left:500px;font-family:Trebuchet MS;font-variant: small-caps;"> Customers List</h1>
    <div style="position:absolute;top:80px;margin-left:60px;">
    <label style="font-family:Trebuchet MS;color:rgb(187, 218, 177);">Customer_Name</label><input type="text" name="cn_tosearch" placeholder="enter name" style="position: absolute;width:300px;margin-left:14px" /></br>
    <label style="margin-left:30px;font-family:Trebuchet MS;color:rgb(187, 218, 177);">Date</label><input type="text" name="Date_tosearch" placeholder="enter date"  style="position: absolute;margin-left:68px;width:300px;"  /></div></br>
     <button type="button" class="btn btn-secondary" style="position:absolute;top:150px;left:280px;">Search</button>

    <div id="divtable" style="background-color:black;width:1200px;height:570px;position:absolute;top:220px;margin-left:90px;" >
      <table style="width:100%;position:absolute;color:red;margin-left:35px;top:10px;" >
      <?php
        $dbs=mysqli_connect("localhost","root","","biz_dairy")
        or die("connection error");
        $q="select * from add_customer";
        $result=mysqli_query($dbs,$q)
        or die("error in query");
        $data=mysqli_fetch_all($result);
         mysqli_close($dbs);
        $c=count($data);

       echo "<tr><th>date</th><th>name</th><th>fanme</th><th>gender</th><th>mob_no</th><th>email</th><th>address</th><th>balance</th></tr>";
       echo  '<form name="register"  method="POST" action="$_SERVER[\'PHP_SELF\']" >';


     for ($i = 0; $i <= $c-1; $i++)
     {

        echo '<input type="checkbox" name="delete[]" value="delete" style="position:relative;top:34px;left:6px;" /><tr>';
        echo '<td>'.$data[$i][0].'</td>';
        echo '<td>'.$data[$i][1].'</td>';
        echo '<td>'.$data[$i][2].'</td>';
        echo '<td>'.$data[$i][3].'</td>';
        echo '<td>'.$data[$i][4].'</td>';
        echo '<td>'.$data[$i][5].'</td>';
        echo '<td>'.$data[$i][6].'</td>';
        echo '<td>'.$data[$i][7].'</td>';

       echo '</tr><br />';
    }

      echo "</form>";
      echo "</table>";
     echo "</div>";
    echo '<input type="submit"  value="delete"  name="submit" style="position:absolute;top:820px;left:600px;">';
    echo " </form> ";

  ?>

 <script src="http://ift.tt/1HheyD3"></script>
<script src="http://ift.tt/1pE3OZd" integrity="sha384-vZ2WRJMwsjRMW/8U7i6PWi6AlO1L79snBrmgiDpgIWJ82z8eA5lenwvxbMV1PAh7" crossorigin="anonymous"></script>




Aucun commentaire:

Enregistrer un commentaire