I have a small guest book I'm basing it off/editing-from of a friends, and I'm trying to define the date to M j but I cant figure out where to edit...
var $total=0;
var $entry_id=0;
var $entry_author='';
var $entry_email='';
var $entry_url='http://';
var $entry_dob='';
var $referer='';
var $entry_date='M j'; //thats where I edited, no result
var $entry_comments='';
var $entry_ip='0.0.0.0';
var $entry_hidden='0';
... ?
function retrieve_entry($id) {
$sql="select * from ".ENTRY_TABLE." where entry_id=".$id;
$result=$GLOBALS["db"]->query($sql);
if($result && ($GLOBALS["db"]->num_rows($result)==1 )) {
$data=$GLOBALS["db"]->fetch_object($result);
$this->entry_id=$data->entry_id;
$this->entry_dob=$data->entry_dob;
$this->entry_author=$data->entry_author;
$this->entry_email=$data->entry_email;
$this->entry_url=$data->entry_url;
$this->entry_comments=$data->entry_comments;
$this->entry_date=$data->entry_date;
$this->referer=$data->entry_referer;
$this->entry_ip=$data->entry_ip;
$this->entry_hidden=$data->entry_hidden;
return true;
}
& heres how I'm inserting it;
print " ".$data->entry_date." | <a href='".$data->entry_url."'>".$data->entry_author."</a><br />".$data->entry_comments."\n";
Please no bashing for the overload/wronge code above, I'm the definition of a newb
currently the dates posting: YYYY-MM-DD HH:MM:SS
thanks in advanced,