Guest User

Untitled

a guest
Feb 13th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. `<tr>
  2. <?php
  3. $dbserver = 'localhost';
  4. $dbuser = 'root';
  5. $dbpass = '';
  6. $con = mysql_connect($dbserver, $dbuser, $dbpass);
  7. if(!$con)
  8. {
  9. die('Could not connect to database!' . mysql_error());
  10. }
  11.  
  12. mysql_select_db('thisdb');
  13. $sql = 'SELECT * FROM rawitems';
  14.  
  15. $resval = mysql_query($sql,$con);
  16.  
  17. if (!$resval) {
  18. die ('SQL Error: ' . mysql_error($con));
  19. }
  20.  
  21. while ($row = mysql_fetch_array($resval))
  22. {
  23. number_format($row['amount']);
  24. echo '<tr>
  25. <td>'.$row['id_raw'].'</td>
  26. <td>'.$row['prodname'].'</td>
  27. <td>'.$row['kl'].'</td>
  28. <td>'.$row['ounce'].'</td>
  29. <td>'.$row['gram'].'</td>
  30. <td>'.$row['quantity'].'</td>
  31. <td>'.$row['price'].'</td>
  32. <td>'.$row['supplier'].'</td>
  33. <td>'.$row['dateclaim'].'</td>
  34. <td>'.$row['shelflife'].'</td>
  35. <td><input type=number name="aji" style="width:100%;" ></td>
  36. <td><center><input type=submit value="UPDATE" id="button1"></center></td>
  37. </tr>';
  38. }?>
  39. </tr>
  40. <tr>
  41. <td><input type=textbox name="a1" style="width:100%;" disabled="disabled" value='<?php echo $SNUM; ?>' required></td>
  42. <td><input type=textbox name="a2" style="width:100%;" required></td>
  43. <td><input name="a3" step="any" id="inputKL" type="number" oninput="weightConverter(this.id,this.value)" onchange="weightConverter(this.id,this.value)" style="width:100%;" required></td>
  44. <td><input name="a4" step="any" id="inputOZ" type="number" oninput="weightConverter(this.id,this.value)" onchange="weightConverter(this.id,this.value)" style="width:100%;" required></td>
  45. <td><input name="a5" step="any" id="inputGrams" type="number" oninput="weightConverter(this.id,this.value)" onchange="weightConverter(this.id,this.value)" style="width:100%;" required></td>
  46. <td><input step="any" type="number" name="a6" style="width:100%;" required></td>
  47. <td><input step="any" type="number" name="a7" style="width:100%;" required></td>
  48. <td><input type=textbox name="a8" style="width:100%;" required></td>
  49. <td><input name="a9" style="width:100%;" id="date" type="date" required></td>
  50. <td><input name="a10" style="width:100%;" id="date" type="date" required></td>
  51. <TD></TD>
  52. <td><center><input type=submit value="SAVE" id="button" onclick="kk();"></center></td>
  53.  
  54.  
  55. </table>
  56. <br/>
  57. <br/>
  58. <br/>
  59. <center> <button id="button" type="submit" name="button_logout">LOGOUT</button></center>`
Add Comment
Please, Sign In to add comment