1234567891011121314151617181920212223242526272829 |
- <!DOCTYPE html>
- <html>
- <meta charset="utf-8">
- <body>
- <?php include 'submitdatabaseinfo1.php';?>
- <?php
- $primarykey = $_GET['primarykey'];
- // 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, story FROM originalstories WHERE primarykey = '".$primarykey."'";
- $result = mysqli_query($conn,$sql);
- $rows = mysqli_num_rows($result);
- while($row = mysqli_fetch_array($result)){
- $txt = wordwrap($row["story"],70);
- echo "<h2>" . $row["title"] . "</h2><br><br><pre>" . $txt . "</pre>";
- }
- mysqli_close($conn);
- exit;
- ?>
- </body>
- </html>
|