Skip to content

Commit

Permalink
fixed adding new songs
Browse files Browse the repository at this point in the history
  • Loading branch information
matjaz321 committed Jun 9, 2017
1 parent cca9b07 commit a5c01ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php/connection-info.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$password = "";
$database = "glasbena_lestvica";

// Create connections
Expand Down
2 changes: 1 addition & 1 deletion php/insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

else if(isset($_POST['new_song'])){
$query = "INSERT INTO glasbe (naslov, dolzina, opis, st_ocene,izvajalec_id) VALUES ('".$_POST['title']."','".$_POST['length']."', '".$_POST['description']."', ' ','".$_POST['izvajalec']."')";
$query = "INSERT INTO glasbe (naslov, dolzina, opis, izvajalec_id, ocena_poz, ocena_neg) VALUES ('".$_POST['title']."','".$_POST['length']."', '".$_POST['description']."', '".$_POST['izvajalec']."', ' ', ' ')";
$result = mysqli_query($conn, $query);

$glasba_id = "SELECT id FROM glasbe ORDER BY id DESC LIMIT 1";
Expand Down

0 comments on commit a5c01ae

Please sign in to comment.