Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
  1. #1
    Junior Member Taylor Hewitt's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    19
    Member #
    11079
    I want to have a site where people go and they don't have to log in or anything (anonymous) and there is just one box, located somewhere on that page, and a submit button. They write something and press submit. It's automaticly submitted on that page with no options involving cookies or anything, meaning they cannot edit or delete or claim it. No names involved either.

    So what am I looking for? Thanks!

  2.  

  3. #2
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Something along the lines of a Shoutbox.

  4. #3
    Junior Member Taylor Hewitt's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    19
    Member #
    11079
    No not a shoutbox. A simple text box and a submit button under. no names, nothing. don't you understand? somebody else said a shoutbox but i don't know how to explain. it's supposed to take up the entire page and have a layout with nice graphics etc. its supposed to be a site where you confess something and people can read other confessions or post their own.

  5. #4
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Ok, so a shoutbox without a username field.

    The size and shape of the box is incidental, as is the layout of the page. Basically you need a database and a quick script that will add a new record to a table in the database. (You could do this with flat files but it's far batter to use a database).

    Do you have access to mySQL/PHP or anything similar?

  6. #5
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Here's a little something I wrote quickly, it's pretty basic but let me know if that's what you're looking for and I can post the source and db schema.

    EDIT - I've attached the files to this post

    http://www.lobsterweb.com/anon/index.php

  7. #6
    Junior Member Taylor Hewitt's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    19
    Member #
    11079
    Yes! That's exactly what I'm looking for!

    Yes I have php and mysql enabled server.

    I would obviously have to make changes so it fits with a layout but I'll check out the files. Thanks so much!

  8. #7
    Junior Member Taylor Hewitt's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    19
    Member #
    11079
    I uploaded the files and here is the url: http://taylorhewitt.com/shas/index.php

    I get this error message:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/taylorhewitt.com/shas/index.php on line 43
    Nothing posted yet!

  9. #8
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Have you run the sql file using phpmyadmin or something similar?

    If not you can do create the database manually - you need a single table called tblComment with two fields, ID and comment. ID is the primary key with automatic increment enabled, comment is text.

    BTW - it's probably a good idea to remove the @ characters that are suppressing errors. It's much easier to spot a problem if the errors are visible. It's good practice to put them back in once the site is live.

  10. #9
    Junior Member Taylor Hewitt's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    19
    Member #
    11079
    Edit: Alright I got it working. Now I have a few questions about tweaking it and separation of the posts. How do I make it create more pages when the page reaches a certain number of posts? And how do I change what separates the posts instead of <hr> and text style etc? Thanks.

  11. #10
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    This bit of the code deals with the output of the posted comments:
    Code:
    // Output the array with a bit of HTML to space it out
    $commentOutput = stripslashes($commentArray['comment']);		
    echo $commentOutput;
    echo "<hr />";
    In PHP to output HTML you need to echo it as you can see from the <hr /> line above. If you're going to output a whole block of HTML it's probably best to jump out of PHP ( using <? and ?> ) rather than having to echo everything.

    As for paging - this article is a decent starting point: http://www.dmxzone.com/ShowDetail.asp?NewsId=6072

    I'll leave it to you to implement but feel free to ask any questions along the way.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com