Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['submit'])){
  3.  
  4. $points = $_POST['points'];
  5. $annotation = $_POST['annotation'];
  6. $id_laboratory = $_GET['id_laboratory'];
  7. $surname = $student['surname'];
  8. $name = $student['name'];
  9. $id_user = $student['id_user'];
  10. try{
  11. $pdo = Database::connectDB();
  12. //$pdo = new PDO($dsn, $user, $password);
  13. } catch (PDOException $e){
  14. echo 'Connection to DB failed' . $e->getMessage();
  15. }
  16.  
  17. try {
  18. $marks -> insertPoints($id_user, $id_laboratory, $points, $annotation);
  19. } catch (PDOException $e){
  20. echo "Nie udało się wstawic punktów";
  21. }
  22.  
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement