SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Addict
    Join Date
    Oct 2003
    Location
    Malaysia
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A good, simple program to write for a beginner?

    Can someone recommend a reasonably complex program that a newbie should attempt to write first?

    Thanks.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2003
    Location
    ct
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wha? That makes no sense.
    KTM RC8 Forum - Motorcycle message board including KTM RC8 motorcycle for sale secion, RC8 how to's, and technical chat.

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by thevirus
    Wha? That makes no sense.
    Something simple, yet challenging.

    I'd suggest a shoutbox or a vBulletin-competitor

    Seriously a shoutbox is good, it's not too tricky, it teaches you how to process and validate form data and use a database. Once you've got a basic shoutbox working, add a registration system and make it so only members can "shout". Another simple yet challenging script could be a news management system. Sounds hard but once you thik about it and break it up into individual parts it's actually pretty easy.

  4. #4
    SitePoint Zealot DarkWulf's Avatar
    Join Date
    Aug 2003
    Location
    US
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For getting your hands dirty, the first thing I would recommend you do is build a really simple template engine. Everything is done through index.php?page=foo, and then figure out how the control structures work. Maybe write an array for your navigation and use foreach to go through it. Stuff like that.

    I would actually start using a database after I'm confident in my PHP (confident as in, you understand the basics of it). A news script is easy, shoutboxes, maybe a guestbook? Another possible thing that I did really early on was a comment system. It was just basically a standalone script that would be included into a page that would displayed/posted comments. Like a shoutbox really, just more useful

  5. #5
    SitePoint Addict
    Join Date
    Oct 2003
    Location
    Malaysia
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Forgive my ignorance but what is the difference between a shout box and a chat room?

    And,

    What is the difference between news management system and a content management system?

    Thanks for the suggestions though...

  6. #6
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shoutbox is not for live conversations, has way less features and is smaller than any chat room. It's like a miniature guest book.

    A news management system manages news only. It's often a part from a content management system (CMS) which is often module based and contains news and articles systems, complicated user/permission systems, workflow management etc.

  7. #7
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is your task

    A Content management system that allows users to
    a) add an article
    b) attach an image
    c) mail a notification to the users currently in the database

    It needs to be able to allow for new users to be added, they will need to login and a cookie will remember them for future use.

    Also needs to have a comments system for guests to use on each article.

    If you want a bit more of a challenge, create a permissions table which outlines exactly which functions each user is able to use.

    Thats kind of an semi-challenging I guess, basically a small CMS, so it will be useful for you to use in the future possibly.

  8. #8
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    vta,ca,usa
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with the consensus that a micro CMS / shoutbox / guestbook is a good first project, and also take the point that throwing a database into the mix may be distracting to the overall goal of learning PHP. So to throw in my two cents and add to what's been recommended, make your script read from / write to a text file for storing its data. It's always good to learn how to manipulate files, which I've always found to be a bit tricky until I sat down and forced myself to work on a script to do that.

    In my mind some good features to add to your project and are worthwhile learning are:
    • User input validation, including functions to 'clean up' the data.
    • File handling.
    • Working with a GET string, e.g. somescript.php?foo=bar
    • Storing a cookie value to read back.
    • Use of sessions to track your user across pages.
    • Regular expressions.
    • Eventually moving the project to a database.

  9. #9
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Southern Maine
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would I set up a simple script or code to use a GET string

    page.php?id=name
    Working on a new CSS site for RKS and PHP driven?

    Looking for staff, tutorial site for coding, and photshop. PM me.

  10. #10
    SitePoint Addict Chillijam's Avatar
    Join Date
    Nov 2003
    Location
    England
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lacrosse
    How would I set up a simple script or code to use a GET string

    page.php?id=name
    To access that kind of information, you need to use the $_GET superglobal*.

    eg

    PHP Code:
    $id $_GET['id']; 
    I'd like to tag my 0.02GBP to this thread and say that the best way to learn is to decide on a project that is going to be useful to you personally. If you have a specific goal that will make your life easier / better, you're more likely to stick at it and get an end result.

    * actually, you don't need to, but other methods are not guaranteed to work.

  11. #11
    SitePoint Zealot Dionysis's Avatar
    Join Date
    Jan 2004
    Location
    Socal
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you suggested to someone asking what's a simple yet challenging place to start with PHP.

    well, i'm trying to work on exactly what you said - a basic CMS. add some news, maybe permissions, database stuff, maybe image stuff.

    i've already got the code working for entering stuff to the database and then spitting it back out. no problem...

    but i'm having trouble with the theory behind some of the rest of it, if anyone is willing to chat with me my icq is 52008849, aim = xdionysisx -- that would be great i have tons of questions.

    which functions to use?
    call all the stuff from your DB and create a static HTML page so the URL is good like www.foo.com/bar.html ?
    dynamic pages?
    security?

    tons of questions.

  12. #12
    SitePoint Addict moonchild's Avatar
    Join Date
    Nov 2003
    Location
    U$A
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by platinum
    here is your task

    A Content management system that allows users to
    a) add an article
    b) attach an image
    c) mail a notification to the users currently in the database

    It needs to be able to allow for new users to be added, they will need to login and a cookie will remember them for future use.

    Also needs to have a comments system for guests to use on each article.

    If you want a bit more of a challenge, create a permissions table which outlines exactly which functions each user is able to use.

    Thats kind of an semi-challenging I guess, basically a small CMS, so it will be useful for you to use in the future possibly.
    wow, i've been playing with php for a couple of years now, and i couldnt even write that i dont think.

  13. #13
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by moonchild
    wow, i've been playing with php for a couple of years now, and i couldnt even write that i dont think.
    Heh - it's not that complex. There's about 3-4 major 'sections' which I'd consider important if you're getting into php for web apps. Uploading files, sending emails, connecting to a datbase and using tables. We're just melding them into a small CMS.

  14. #14
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    va
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think a calendar would be perfect. one page showing only the days in the particular month of the year. hit "next month" or "previous year" etc. to displays other dates.
    mind you, only one php page.
    this should really give you a feel of loops, php date formats, and formatting data in tabular formats.

    if you're done with this, you can really get wild and get data from a database and highlight dates which have information stored in them. add, edit and delete dates. sort of like a small outlook calendar system. but that's for the advanced side.

  15. #15
    SitePoint Zealot Packetloss's Avatar
    Join Date
    Aug 2003
    Location
    Behind You
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anything that would require the use of SQL queries would be fine to get you started. Learning how to make your own basic template system would be very helpful down the road as well.

    Things to make:

    Start of with a basic content manager with news. Go on to articles. Learn how to categorize the articles & news, later on add a membership system. Once you can complete a CMS, you have great fundamentals to continue on learning more advanced stuff. my 2 cents
    My links: [ Blog ] - [ deviantArt ]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •