<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
define("DB_HOST","mysql117.loopia.se");
define("DB_USER","normal@i103189");
define("DB_PASS","KungMicke87");
define("DB_NAME","indiehjaerta_com");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - News</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/> -
<a href="profile.php">Profile<a/> -
<a href="logout.php">Logout<a/>
<br /> <br />
<!-- New Post Start -->
<?php
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli));
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = mysqli_query($sqli, "SELECT * FROM news ORDER BY id") or die("Error: ".mysqli_error($sqli));
echo '<table border="0">';
while ($row = mysqli_fetch_array($query))
{
echo '<tr>';
echo '<td><span class="text">Subject:</span></td>';
echo '<td><span class="text"> .$row['headline']. </span></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2"><span class="text">Story:</span></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2"><span class="text">' .$row['story']. '</span></td>';
echo '</tr>';
echo '<tr>';
echo '<td><span class="text">Written by:</span></td>';
echo '<td><span class="text"> .$row['userid']. </span></td>';
echo '</tr>';
echo '<tr>';
echo '<td><span class="text">Time:</span></td>';
echo '<td><span class="text"> .$row['timestamp']. </span></td>';
echo '</tr>';
}
echo "</table><br />";
?>
<!-- New Post End -->
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<span class="text">Page generated in '.$total_time.' seconds.</span><br />';
?>
</body>
</html>
- Output for 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected 'headline' (T_STRING), expecting ',' or ';' in /in/nAsaV on line 62
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/nAsaV on line 62
Process exited with code 255.
preferences:
187.68 ms | 1395 KiB | 65 Q