Save articles / post with format and images

0

I have searched some courses or google but I have not succeeded or suddenly I have eaten my head alone. If I have a blog page, information articles with nice text with a typeface, in italics and with nose styles and some images inside. How can I save all that format of the article? Am I trying with php and mysql, is there some kind of data or strategy to follow in this case? I do not want to do it with WordPress.

    
asked by kmilo93sd 20.05.2018 в 14:14
source

1 answer

0

What you ask is simple. You must use MySQL to save what would be the articles in a database. I do not recommend that you save images in a database, since they are very heavy and can significantly lower performance.

So, if you want to save an article there are several aspects to take into account;

  • Each article is unique, so each article must have a different id
  • Each article has title and content, so you must create a column called title and content
  • If you add images, I recommend that you save the images in a separate folder, then what you would gaurdarias in the database, would be your name and extension and you would program the address with PHP.
  • I would really help you to show you a PHP code, but what you ask is very extensive, I recommend that you see some simple PHP tutorials, tutorials that teach you how to work PHP files, since you can avoid an SQL injection or upload of unwanted files

        
    answered by 20.05.2018 в 20:10