Posts

Showing posts from August, 2015

Google Chart with Database.

Image
<?php include("db.php"); $query = "select * from warehouse"; if ($result = mysql_query($query)) {     {     $rows = array();     $table = array();     $table['cols'] = array(             array('label' => 'Warehouse', 'type' => 'string'),             array('label' => 'Percentage', 'type' => 'number')     );     while ($row =mysql_fetch_array($result)) { $begani=mysql_fetch_array(mysql_query("select sum(stcokprice) from beganinventory where warehouse='$row[2]'")); $a="warehouse"; $b=200;             $temp = array();             $temp[] = array('v' => (string) $row[2]);             $temp[] = array('v' => (int) $begani[0]);             $rows[] = array('c' => $temp);             }    }  } $table['rows'] = $rows; $jsonTable = json_encode($table); ?> <link href="myadminstyle.css" rel="styleshe

Add Texfield in Html Table through Javascript.

<script type="text/javascript"> function addRow(tableID) {         var table = document.getElementById(tableID);         var rowCount = table.rows.length;         var row = table.insertRow(rowCount);         var cell1 = row.insertCell(0);          cell1.innerHTML = rowCount;         var cell2 = row.insertCell(1);         cell2.innerHTML = "<input type='text' name='key[]' style='width:140px;'>";         var cell3 = row.insertCell(2);         cell3.innerHTML = "<input type='text' name='descr[]' style='width:140px;'>";         var cell4 = row.insertCell(3);         cell4.innerHTML = "<input type='text' name='city[]' style='width:140px;'>";         var cell5 = row.insertCell(4);         cell5.innerHTML = "<input type='text' name='address[]' style='width:140px;'>";  var cell6 = row.insertCell(5);         cell6.inner

Edit Data in Database through html Table

 <table cellspacing="0" style="font-size:15px;" width="100%" align="center" id="sl">    <p class="a">Custom Subsidiary</p>  <INPUT type="button" value="Add" onclick="addRow('sl')" style="font-family: 'icomoon';     font-size: 12px;content: \e608;"/>   <tr style="" width="100%">   <th style="border-bottom: black 2px solid;"></th>     <th style="border-bottom: black 2px solid;text-align:left;" valign="left">Key</th>   <th style="border-bottom: black 2px solid;text-align:left;" align="left">Description</th>   <th style="border-bottom: black 2px solid;text-align:left;" align="left">City</th>   <th style="border-bottom: black 2px solid;text-align:left;" align="left">Address</th>