Hi Matt, Hope you doing good.
I have tried to add image to the cms in the front page , meaning that a small picture could be added to the news headlines. For example,
[Here Matt's picture] Matt's Explanation of creating this CMS.
you see here picture with news on the right side, if pic is available can be added the news or interview on the front-page.
I have created this class with three properties
class Image
{
public $id = null;
public $path = null;
public $article_Id = null;
/*
* Constructor
* @params $id primary key in database to be incremented.
* @params $path path of the upload image
* @params $article_id, foriegn key to be gotten from the article
*/
public function __construct($pic = array())
{
if (isset($pic['id']))
$this->id = (int)$pic['id'];
if(isset($pic['img']))
$this->path = $pic['path'];
if(isset($pic[article_Id]))
$this->article_Id = (int)$pic['article_Id'];
}
i have created the corrosponding database to this class.
I am finding it little bit unnecessary to program too much as i have tried, you may know easier way. Please tell me what i need to do to add images to articles when they are available
Is it a good to do it like that or could there be an easier way to do it.
I just want that i could add picture to the interviews and news when theres pic for it and in viewArtical page, there can be more than one picture added to the page, but the front page only one picture.
I know you already did a good job. I would like that you explain me the easiest way or the best way to do it.
Matt thanks a lot.
Mubo