Yes im stuck on what i thought i knew how to do...
Well my problem is,
I am making a bloging script and i post the date automatically using NOW() function
<?php
require("conn.php");
if($_POST['btnAdd'] != "")
{
$sql = "INSERT INTO blogrollentries (entryTitle, entryText, entryDate) VALUES ('" . $_POST['entryTitle'] . "','" . $_POST['entryText'] . "', NOW())";
if (mysql_query($sql, $conn))
{
$new = true;
}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Jamie Thompson » Blog|Roll</title>
</head>
<body>
<?php if($new == ture)
{?>
<strong>Your New Entry Has Been Added.</strong>
<?php
}?>
<form method="post" action="post.php">
<input name="entryTitle" id"entryTitle"/>
<textarea name="entryText" id="entryText"> </textarea>
<input type="submit" name="btnAdd" value="Add Entry"/>
</form>
</body>
</html>
Thats the code
and then i display it i formatt it and then display it
<?php
require("conn.php");
$result = mysql_query("SELECT entryID, entryTitle, entryText, Unix_TIMESTAMP(entryDate) AS theDate FROM blogrollentries ORDER By entryDate DESC LIMIT 10");
if ( mysql_num_rows($result) > 0 ) {
while ($row = mysql_fetch_array($result)){
$theDate = date("l jS F Y", $row['theDate']); ?>
Then later on i call the date
<?=$row['theDate'] ?>
But instead of getting 5th of november 2005 i get
Any idears what is wrong
Thanks alot
Jamie