Advertisement
metaqer1234

Untitled

Feb 18th, 2024
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. $chemist = $_POST['chemist'];
  2. if (empty($_POST['pob'])) {
  3. $pobErr = 'required';
  4. } elseif (empty($_POST['strips'])) {
  5. $stripsErr = 'required';
  6. } elseif (empty($_POST['chemist'])) {
  7. $chemistErr = 'required';
  8. } else {
  9. if (!is_numeric($_POST['pob'])) {
  10. $msg = '<span class="error"> Data entered was not numeric</span>';
  11. } else {
  12. if (!is_numeric($_POST['strips'])) {
  13. $msg2 = '<span class="error"> Data entered was not numeric</span>';
  14. } else {
  15. $field_array = array('pob' => $_POST['pob'], 'strips' => $_POST['strips'], 'chemist' => $_POST['chemist'], 'bdm_id' => $tf_id, 'type' => 'tf', 'created_at' => date('Y:m:d '));
  16. $rx = new pob();
  17. $rx->create($field_array);
  18. flashMessage('Added Successfully', 'success');
  19. }
  20. }
  21. }
  22. }
  23. ?>
  24. <a href="dashboard.php" class="btn btn" >Back</a>
  25. <?php
  26. require_once 'header.php';
  27. if (isset($_SESSION['message'])) {
  28. echo $_SESSION['message'];
  29. unset($_SESSION['message']);
  30. }
  31.  
  32.  
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement