Why the hell doesnt dreamweaver do that? I might not have it on
ok, i see, seventh.
Created 19 years ago2005-07-20 14:40:41 UTC by Luke
// Check if user is authorized (login.php) //
$authorized=$_SESSION['auth'];
// Get Data From Form //
$title=$_POST['title'];
$time=date("F j, Y, g:i a");
$poster=$_POST['poster'];
$article=$_POST['article'];
if($authorized==1) { // If your logged in //
$query="INSERT INTO news VALUES ('','$title','$time','$poster','$article')";
mysql_query($query);
header('Location: index.php');
} else {
header('Location: login.php');
}
}$query="SELECT * FROM news ORDER BY id DESC";
$result=mysql_query($query);
$rows=mysql_num_rows($result);
$i=0;
while($i<$rows) {
$title=mysql_result($result,$i,'title');
$time=mysql_result($result,$i,'time');
$poster=mysql_result($result,$i,'poster');
$article=mysql_result($result,$i,'article');
echo "<br><b>$title</b><br><i>Written on $time by $poster</i><br> $article<hr>";
$i=$i+1;
}
}