Advertisement
Ruthp

Untitled

Sep 22nd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <?php
  2. require_once '01_Dbfuncs.php';
  3. include '03_Menu.php';
  4. $err="";
  5.  
  6.  
  7. if($_SERVER["REQUEST_METHOD"]=="POST")
  8. {
  9. $pname = trim(filter_input(INPUT_POST,'pname',FILTER_SANITIZE_SPECIAL_CHARS));
  10. $packtype = trim(filter_input(INPUT_POST,'packtype',FILTER_SANITIZE_SPECIAL_CHARS));
  11. $recomprice = trim(filter_input(INPUT_POST,'recomprice',FILTER_SANITIZE_SPECIAL_CHARS));
  12. $fmlycode = $_SESSION ['fcode'];
  13.  
  14. AddProduct($pname, $packtype, $recomprice, $fmlycode);
  15.  
  16. header("Location:07_Purchaselist.php");
  17. }
  18.  
  19.  
  20.  
  21. ?>
  22. <!DOCTYPE html>
  23. <!--
  24. To change this license header, choose License Headers in Project Properties.
  25. To change this template file, choose Tools | Templates
  26. and open the template in the editor.
  27. -->
  28. <html>
  29. <head>
  30. <meta charset="UTF-8">
  31. <title>add product to family</title>
  32. </head>
  33. <body>
  34. <h1>
  35. add product to family
  36. </h1>
  37. <form method = "post">
  38. Product name:
  39. <input type = "text" name ="pname" ><br><br>
  40. Pack type:
  41. <select name="packtype">
  42. <option value="variety"> variety </option>
  43. <option value ="package"> package </option>
  44. </select><br><br>
  45. Recommended price:
  46. <input type ="text" name ="recomprice" ><br><br>
  47.  
  48. <input type="submit" value="Add product">
  49.  
  50. </form>
  51.  
  52. <?php
  53. // put your code here
  54. ?>
  55. </body>
  56. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement