Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links






 
 

SPONSORS



 
 

News builder

Have you ever wanted to have one of those sites which displays the news in the middle of its index page , these usually have a title , a brief description , date , author and a URL . In this example we will create a database to store our news items which we will be able to add via an admin form which the webmaster will enter information . we will then display this info on our page , displayed by newest items . The reason I am building this is that latest news can be time consuming adding news items , removing news items etc so this should save some time. Anyway lets get on with it and create our database .

CREATE DATABASE news;
USE DATABASE news;

Now create a table like the following on the MySQL command line

Ok we will now create a form for you to enter your information , the info we want to submit is author , description , url and title . Here is the form we created .

<form action ="testingnews1.php" method = "post">
<table>
<tr><td>title</td><td><input type ="text" name = "title"></td></tr>
<tr><td>author</td><td><input type ="text" name = "author"></td></tr>
<tr><td>description</td>
<td><textarea name ="desc" rows = "5" cols = "50" wrap="VIRTUAL"></textarea></td></tr>
<tr><td>url</td><td><input type ="text" name ="url"></td></tr>
<tr><td><input type="submit"></td><td><input type = "reset"></td></tr>
</table>
</form>

This will create our form , note in this example we have called the script testingnews1.php.

In the next part we will log the information and display the links.

go to part 2