SunQuest
 
       Miscellaneous
  Home arrow Miscellaneous arrow Creating a News System with PHP - Part 1
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Creating a News System with PHP - Part 1
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2002-02-23

    Table of Contents:
  • Creating a News System with PHP - Part 1
  • Validating the Form
  • Storing the Form Data
  • Displaying the News

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Creating a News System with PHP - Part 1


    (Page 1 of 4 )

    This is part one in a three part series on creating a news system with PHP. This first installment will teach you how to create a very simple news system using only a file as storage.

    So, you want to display news on your site? Think it'd be pretty cool to have a page where you can enter something each day and then the whole world gets to see it? Well, I'm here to tell you how in this first installment of "Creating a News System".

    First installment? That's right. This first tutorial is going to cover just the very basics - a news system that reads and writes to a text file and that's about it. In the second installment, we will move over to a database. And then in the third installment, we will incorporate features such as commenting and user authentication.

    Ok, let's get started. So, what do we need to do first? Well, obviously we can't display any news unless we have news to display. So, let's first build our interface to accept new news. For this, we will use a simple HTML form. We need inputs for a name and the news. We also need an input for a password. In this first installment, we are only going to secure our page with a simple password. In the third part of this tutorial we will add multiple users authenticated from a database. Ok, so the code for our input form should look something like this:

    <FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="newsentry">
    Your name:<BR>
    <INPUT TYPE="text" SIZE="30" NAME="name"><BR>
    The News:<BR>
    <TEXTAREA NAME="news" COLS="40" ROWS="5"></TEXTAREA><BR><BR>
    News Password:<BR>
    <INPUT TYPE="password" SIZE="30" NAME="password"><BR>
    <INPUT TYPE="submit" NAME="submit" VALUE="Post it!"><BR>
    </FORM>

    More Miscellaneous Articles
    More By Matt Wade


       · Denne artikel er nu ret interessandt, mon ikke der er noget der kan bruges her ?
       · im new on php, all this code goes embedded on another html file or in the same...
     

    MISCELLANEOUS ARTICLES

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway