SQL,Very,simple,module,your,users,post,their,
Quick Search for:  in language:    
SQL,Very,simple,module,your,users,post,their,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
PHP Stats

 Code: 70,122 lines
 Jobs: 9 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for PHP.
iif() function
By Martin C. Conniffe on 8/16


Dynamic List of Specified Files
By nothing34543534 on 8/15


Active Users (No MySQL) UPDATED! BETTER!
By Brandon Sachs on 8/15


PassGen v 1 stable
By Bogomil Shopov on 8/15


toString v 1.0 b
By Bogomil Shopov on 8/15


Calculating factorials
By Daniel Destro do Carmo on 8/14


AcidicChip's MP3 ID3v2 Tag Writer 1.0
By Chance O. One on 8/14


Click here to see a screenshot of this code!user 2 user messenger 2
By Cornelius Herzog on 8/14

(Screen Shot)

htaccess
By Sven Wagener on 8/13


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Annotate

Print
Email
 
VB icon
Submitted on: 10/29/2000 7:47:25 PM
By: PHP Code Exchange  
Level: Intermediate
User Rating: By 2 Users
Compatibility:PHP 3.0, PHP 4.0

Users have accessed this code 5003 times.
 
 
     Very simple module to let your users post their comments on your Web pages. Does not require SQL. Does require a writeable directory. by Steve Yelvington
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    //**************************************
    //     
    // Name: Annotate
    // Description:Very simple module to let
    //     your users post their comments on your W
    //     eb pages. Does not require SQL. Does req
    //     uire a writeable directory. by Steve Yel
    //     vington
    // By: PHP Code Exchange
    //**************************************
    //     
    
    <?
    /*
    annotate.php3 
    This is a module that can be placed on any php3 page to allow users to add
    their comments. The comments are stored in a file in the current directory,
    whose name is constructed by adding ".comment" to the calling page's name,
    and merged into the calling page dynamically. (The calling page is not
    modified.)
    I wrote this because I wanted a simple way to add this functionality to my
    pages without requiring that mySQL be available.
    In the message input, blank lines are converted to paragraph tags. No other
    conversions are applied. If you don't want your users to be able to input
    html, uncomment the "strip_tags" line.
    Note that the directory must be writable by the web server.
    Put this module in some convenient location and then embed it in your pages
    like so:
    require("/some/full/path/annotate.php3");
    or, relative to the docroot:
    require($DOCUMENT_ROOT . "/relativepath/php3");
    Steve Yelvington <steve@yelvington.com>
    */
    if ($message)
    	{
    	/* uncomment the next two lines to strip out html from input */
    	/* $name = strip_tags($name); */
    	/* $message = strip_tags($message); */
    	$message = ereg_replace("\r\n\r\n", "\n<P>", $message);
    	$date = date("l, F j Y, h:i a");
    	$message = "<B>$name </B> -- $date<P> $message <BR><HR>";
    	$fp = fopen (basename($PHP_SELF) . ".comment", "a");
    	fwrite ($fp, $message);
    	fclose ($fp);
    	}
    @readfile(basename(($PHP_SELF . ".comment")));
    ?>
    <FORM method="post">
    <b>Your name:</b><BR><INPUT name="name" type="text" size="55"><BR>
    <b>Your comment:</b><BR><TEXTAREA name="message" rows=10 cols=55 wrap=virtual>
    </TEXTAREA><BR>
    <INPUT name="submit" type="submit" value="Post your comments">
    </FORM>


Other 198 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments

 There are no comments on this submission.
 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | PHP Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.