Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //insert.php
- $connect = mysqli_connect("", "", "", "");
- $connect->set_charset("utf8");
- if(!empty($_POST))
- {
- $output = '';
- $KaID = mysqli_real_escape_string($connect, $_POST["KaID"]);
- $KiID = mysqli_real_escape_string($connect, $_POST["KiID"]);
- $LID = mysqli_real_escape_string($connect, $_POST["LID"]);
- $query = "
- INSERT INTO card_chest_level_m2m(KaID, KiID, LID)
- VALUES('$KaID', '$KiID', '$LID')
- ";
- if(mysqli_query($connect, $query))
- {
- $output .= '<label class="text-success">Level HinzugefĂĽgt</label>';
- $select_query = "SELECT * FROM card_chest_level_m2m ORDER BY m2mID";
- $result = mysqli_query($connect, $select_query);
- $output .= '
- <table class="table table-bordered">
- <tr>
- <th width="25%">Karte</th>
- <th width="25%">Kiste</th>
- <th width="25%">Level</th>
- </tr>
- ';
- while($row = mysqli_fetch_array($result))
- {
- $output .= '
- <tr>
- <td>' . $row["KaID"] . '</td>
- <td>' . $row["KiID"] . '</td>
- <td>' . $row["LID"] . '</td>
- </tr>
- ';
- }
- $output .= '</table>';
- }
- echo $output;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement