Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Developing a website that allows members to post

  1. #1
    Join Date
    Nov 2005
    Beans
    313
    Distro
    Kubuntu 8.04 Hardy Heron

    Developing a website that allows members to post

    Hello,
    I am trying to build a kind of craigslist for my university. I want to use PHP and I have an idea of how to do the messaging portion. What I do not know how to do is create a new page when someone creates a post, automatically create a separate page for that post (and place it properly on the sitemap), message the webmaster that a post is made, and add it to the list of posts.

    I don't know if I made sense but any idea can help us.

    FYI, I am trying to use Joomla!, maybe phpBB and Wordpress. Let me know. Thanks.
    Open Source = Freedom
    Check out my nerdy gear at http://www.cafepress.com/bestgeekchic

    Gotta love the Ubuntu

  2. #2
    Join Date
    Aug 2007
    Location
    Waterloo Ontario (Canada)
    Beans
    424
    Distro
    Ubuntu Development Release

    Re: Developing a website that allows members to post

    The PHP style isn't to actually physically create a new page every time a post is made, but rather to have a generic "viewPost.php" page which takes (through POST or GET) some arguments specifying which post to view, and then grabbing that data from a SQL database and displaying it as part of viewPost.php. The corresponding logic and presentation is stored in the .php file itself, while the per-post data (the text, date, author, etc) is stored in the database.
    If your problem has been solved, please mark the threas as [SOLVED]. This helps people with the same problem know which threads to check out when they do a search on their issue many days later

  3. #3
    Join Date
    Nov 2005
    Beans
    313
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Developing a website that allows members to post

    Cool,


    Ya I kinda of figured that the PHP was there just to communicate with the database (help enter and retrieve data). What I wanted to know is how to create a new page with the data just entered so that when someone comes onto the site after a post is made, they can see the post that was just made (and previous posts as well). Any ideas?
    Open Source = Freedom
    Check out my nerdy gear at http://www.cafepress.com/bestgeekchic

    Gotta love the Ubuntu

  4. #4
    Join Date
    Aug 2007
    Location
    Waterloo Ontario (Canada)
    Beans
    424
    Distro
    Ubuntu Development Release

    Re: Developing a website that allows members to post

    Quote Originally Posted by TorchlightJay View Post
    Cool,


    Ya I kinda of figured that the PHP was there just to communicate with the database (help enter and retrieve data). What I wanted to know is how to create a new page with the data just entered so that when someone comes onto the site after a post is made, they can see the post that was just made (and previous posts as well). Any ideas?
    That's what I'm saying though -- you don't "create a new page"... you have just ONE page that simply displays the newest thing in the database. Subtle but important distinction. Even when there's 500 posts there's still only ONE physical .php file in your webserver's directory.
    If your problem has been solved, please mark the threas as [SOLVED]. This helps people with the same problem know which threads to check out when they do a search on their issue many days later

  5. #5
    Join Date
    Apr 2007
    Beans
    14,781

    Re: Developing a website that allows members to post

    Quote Originally Posted by AdrianP View Post
    That's what I'm saying though -- you don't "create a new page"... you have just ONE page that simply displays the newest thing in the database. Subtle but important distinction. Even when there's 500 posts there's still only ONE physical .php file in your webserver's directory.
    For example, look at the URI's of this forum, and even my personal website: http://laroza.freehostia.com/home

  6. #6
    Join Date
    Aug 2007
    Location
    Waterloo Ontario (Canada)
    Beans
    424
    Distro
    Ubuntu Development Release

    Re: Developing a website that allows members to post

    Quote Originally Posted by LaRoza View Post
    For example, look at the URI's of this forum, and even my personal website: http://laroza.freehostia.com/home
    Exactly Keep in mind that everything after the '?' in a URL is simply GET parameters being passed to the server, and not part of the actual filename. Read up on GET and POST for more details.
    If your problem has been solved, please mark the threas as [SOLVED]. This helps people with the same problem know which threads to check out when they do a search on their issue many days later

  7. #7
    Join Date
    Apr 2007
    Beans
    14,781

    Re: Developing a website that allows members to post

    Quote Originally Posted by AdrianP View Post
    Exactly Keep in mind that everything after the '?' in a URL is simply GET parameters being passed to the server, and not part of the actual filename. Read up on GET and POST for more details.
    Ah, yes. Forgot about that, it was too "obvious" (to me) to mention

  8. #8
    Join Date
    Nov 2005
    Beans
    313
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Developing a website that allows members to post

    Awesome, that sounds like it'll work. Well we are going to use multiple pages just to subdivide categories and stuff. The university wants every post to have a page so I can see how your idea can work in listing all the posts in one category (I may have to create a database for every category? Maybe just a table for every category? Thoughts?). I will look at that tutorial.

    Can I do all of this on Joomla! or will I just do this the old school method? Thanks.
    Open Source = Freedom
    Check out my nerdy gear at http://www.cafepress.com/bestgeekchic

    Gotta love the Ubuntu

  9. #9
    Join Date
    Aug 2007
    Location
    Waterloo Ontario (Canada)
    Beans
    424
    Distro
    Ubuntu Development Release

    Re: Developing a website that allows members to post

    Quote Originally Posted by TorchlightJay View Post
    Awesome, that sounds like it'll work. Well we are going to use multiple pages just to subdivide categories and stuff. The university wants every post to have a page so I can see how your idea can work in listing all the posts in one category (I may have to create a database for every category? Maybe just a table for every category? Thoughts?). I will look at that tutorial.
    Not even a table. You could just have a VARCHAR column called 'category' in your Posts table. Then if you wanted all the posts in the 'math' category, for instance, you could just do "SELECT * FROM Posts WHERE category = 'math';". Voila!

    Quote Originally Posted by TorchlightJay View Post
    Can I do all of this on Joomla! or will I just do this the old school method? Thanks.
    I'm not a Joomla expert, but I'm fairly sure all CMS have at least this basic functionality, so you should be all set with Joomla
    If your problem has been solved, please mark the threas as [SOLVED]. This helps people with the same problem know which threads to check out when they do a search on their issue many days later

  10. #10
    Join Date
    Nov 2005
    Beans
    313
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Developing a website that allows members to post

    I think I am following. One quick question, anyone know of a good tutorial I can use? Just want to make sure I do it write. I know how to parse data to a mysql database with PHP, I am just not sure how to get it to show up the way you guys mentioned. Thanks.
    Open Source = Freedom
    Check out my nerdy gear at http://www.cafepress.com/bestgeekchic

    Gotta love the Ubuntu

Page 1 of 2 12 LastLast

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
  •