<?php
error_reporting( E_ALL );
session_start();
header("Cache-control: private");
?>
<html>
<head><style>
a:hover { color: #ff0033; font-size: 15; }
</style></head>
<body TEXT ="#FF0033" BGCOLOR="#000000" alink="#FF9933" vlink="#FF9933" link="#FF9933">
<?
$host = "localhost";
$user = "landoffor";
$pass = "";
$db = "lof_uk_db";
$usercheck = $_SESSION['usercheck'];
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
$query = "SELECT * FROM Province WHERE username='$usercheck'";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$query1 = "SELECT message FROM forum";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_row($result1);
$numrow = mysql_num_rows($result1);
if ($numrow < 1){
echo 'sorry forum empty';
?>
<form action ="posted.php" method = "post">
<center><textarea name = "newmessage" ROWS=15 COLS=35>
</textarea></center><BR>
<center><input type = "submit" name ="submit" value = "post message"></center>
<?
}
if ($numrow > 0){
echo $row1[0];
?>
<table Width = "300" border = "1">
<?
while(list($message) = $mysql_fetch_row($result1)) {
echo "<tr>";
echo "<td>";
echo $message;
echo "</td>";
echo "</tr>";
}
}
?>
</table>
</body>
</html>
what the heck is wrong with my script!!!!
the message is in the database but it wont display it?
where the mysql_num_rows are there used to be mysql_fetch_row but now it wont load the page at all?