Advertisement
mcnc

sql insert

Nov 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <!--
  4. To change this license header, choose License Headers in Project Properties.
  5. To change this template file, choose Tools | Templates
  6. and open the template in the editor.
  7. -->
  8. <html>
  9. <head>
  10. <meta charset="UTF-8">
  11. <title>SQL insert</title>
  12. </head>
  13. <body>
  14. <form action="index.php" method="post">
  15. <p>Proizvodjac: <input type="text" name="proizvodjac" /></p>
  16. <p>Model: <input type="text" name="model" /></p>
  17. <p><input type="submit" name="submit" value="Upisi" /></p>
  18. <?php
  19. if(!empty($_POST["proizvodjac"]) && !empty($_POST["model"])) {
  20.  
  21. $proizvodjac = $_POST["proizvodjac"];
  22. $model = $_POST["model"];
  23.  
  24. echo "INSERT INTO baza (Proizvodjac, Model) VALUES ($proizvodjac, $model);";
  25. }
  26. ?>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement