How to post news on PHP website without modifying http page?

With the news script, you can post news on your PHP website without modifying your http page.

The realization of the news script

You need to know:

- Working with a database
- Working with forms
- Working with dates and timestamp.

By combining databases and forms, you can perform most of the common scripts !

You will need to separate your script into pages. You will simply need to :
- A page displaying the various news (usually this is the home page)
- A page for writing your news (is therefore a page containing a form for entering these news)
- Inserting a page news in your database.

The news script in PHP consists of two major parts:

-The display news: this script will show by example the last five news on your homepage. This is a very simple script to achieve: a query in the database. In general, the display of news is in the host file of your site (index.php).
- Administration: It includes two PHP pages from which you can add, modify, delete news. These pages should be protected by .htaccess to prevent anyone can have fun writing news.

Finally you must know three little functions that we need to think about using: nl2br, addslashes and stripslashes.
- nl2br: used to save you typing the line breaks in HTML.
- addslashes: in fact, it is not always required to use this feature depending on your web host. But it is better to take the good habit of using it. So before recording the title and content of the news, you apply them addslashes.
- stripslashes: This function does the opposite. Use it just before the title display and content of the news to avoid that one way backslash.

You will especially need these features in the page that displays the news to your visitors ( index.php ) . Keep in mind when you write a news item that you can type HTML.

For all informations about php development, click here !

Staying creative and innovative as a comapny

It is seen that many companies are born every day, and more of them are so really useful and helpful for many people, from many countries. But, according to this, it is also important to remember that most of them didn’t offers the same advantages in terms of technology.Applying for a great companyIt is to remember that nowadays, even with the unstoppable increasing of technology, many societies are still far to them. However, the majority of companies, big or not, are all (php developers) [...]

Elite Print, how to change your page presentation easily !

Several tools are available to you to enable you to change the page layout of your website. However, these are not all that easy to use. Therefore Elite Print provides an innovative solution for online personalization for your convenience. To do this, you do not need to hire a web php developer. Indeed, we offer you professional in the field to accompany you throughout the integration. Our online editor easily connects to e-shopping sites. All businesses whether large, medium or small sizes [...]

New frameworks empowered PHP to do bigger and greater things

In this article, we can see which php programming languages are used to create web sites to get things better and greater. We'll take a better examine every language, its execs and cons, and why you have to or should not use it. When we need to create a website, we regularly spend hours questioning which language is first-rate in your situation.The electricity of the internet programming languageWhen you need to pick out a language in your website, you furthermore need to ask [...]

Follow us on