How to let a website visitor dynamically write some text to the page?
Has to be php so it's indexable. Or if that can be done with js cool. I want a visitor to be able to write text and push submit and it goes on the webpage. Exactly like a comment engine would.
Do you have any experience with (MySQL) databases? It's rather trivial, you need to submit form to the PHP page that will save posted content to the database (or file if you want) and when (your original) page is loaded just read and display the data.
The point is you need to save the content on your server. It depends on your needs (and knowledge) whether you'll use file(s) or database to store the data.
No I don't. But I know it's easy right. I could just store them in a flat file too right?
If you don't need to do advanced selection of data but just read the data as it was written, then yes. You can use [file_get_contents and [URL="http://www.php.net/manual/en/function.file-put-contents.php"]file_put_contents](http://php.net/manual/en/function.file-get-contents.php). Just make sure that user which executes PHP binary has correct permissions to write to your data file(s). Note that these functions are just wrappers to standard fopen, fwrite/fread and fclose functions.
I just need a guestbooks script actually. It just needs to be flat file and have a captcha.
First result from a search of Google gives http://www.phpjunkyard.com/php-guestbook-script.php which uses a flat file, has a captcha and is free.
I need a website entry field too. Preferable links the name. I tested many without a website field. I can't seem to find a way to make the link a hyperlink. Bbc code nor html works in them.
If you can use MySQL database you can check the comment script script I've made. It has website field and supports simple HTML. It integrates into your custom php files.
are you trying to do this ?
inline page update?
A simple commenting engine solution would be disqus. No programming really required with a service like that.
Disqus is nofollow. Needed to be dofollow
This topic is now closed. New replies are no longer allowed.