123456789101112131415161718192021222324252627282930313233 |
- <!DOCTYPE html>
- <html>
- <meta charset="utf-8">
- <body>
- <?php include 'submitdatabaseinfo.php';?>
- <?php
- $lang = $_GET['lang'];
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- mysqli_set_charset($conn, "utf8");
- // Check connection
- if (!$conn) {
- die("Database connection failed: " . mysqli_connect_error());
- }
- $sql = "SELECT title, primarykey FROM originalstories WHERE checked = 'yes' AND language = '".$lang."'";
- $result = mysqli_query($conn,$sql);
- $rows = mysqli_num_rows($result);
- if ( $rows > 0 ) {
- echo "<tr><th></th><th>Choose the title of the story you have translated</th></tr>";
- while($row = mysqli_fetch_array($result)){
- echo "<tr> <td> <input type='radio' name='titlestotranslate' value='" . $row["primarykey"] . "' onclick='showtitle(" . $row["primarykey"] . ")'> </td> <td id='" . $row["primarykey"] . "'>" . $row["title"] . "</td></tr>";
- }
- } else {
- echo "<tr><th></th><th>There are no stories in this language</th></tr>";
- }
-
- mysqli_close($conn);
- exit;
- ?>
- </body>
- </html>
|