|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Using htmlArea and a Database to Maintain Content on a Website
If you wish to develop a website that others can contribute to, one option is to have text files sent as e-mail attachments, convert these to HTML and then upload the file. There is, however, a better way! If the people making submissions to your site are capable of using a word processor then things can be done much more efficiently. This article will show you how to use a free component called htmlArea and a database to handle the addition and display of content on your website. Some knowledge of HTML, databases and server-side scripts is assumed.
Read the full article here: Using htmlArea and a Database to Maintain Content on a Website |
|
#2
|
|||
|
|||
|
Nice artical but there there are alot of bugs in your code.
I dont think you tested it at all, or am I mistaking. For people with less understanding here comes sollutions. 1) Remove the <p> tags arround the textarea 2) In the connection.php only place this info $username = "yourusername"; $password = "yourpassword"; $hostname = "localhost"; $databasename = "databasename"; 3) copy past watch out for the ? > (no space) ?> 4) processform.php mysql_selectdb must be mysql_select_db opendatabase(); not needed just mark as //opendatabase(); 5) dbfunctions.inc place there: function showerror(){ echo "Query not executed"; } 6) gettext.php wrong query this is the correct one: $strsql = "Select title, topic, author, contents, Date_Format(whenadded,'%M %e,%Y') AS formatted from items WHERE id = $itemnumber"; Good luck if someone needs a working version just let me know I will mail it to you. Cya Bjorn |
|
#3
|
|||
|
|||
|
To Cya Bjorn
This article is based on a real-life web application. In order to focus on the problem at hand and keep the article to a reasonable length some code was not included ("... functions to open the database are not shown ..."). Likewise the database structure was altered slightly. Obviously this was not entirely successful. Thanks for your helpful comments. Hope you found it useful.
Peter Lavin (author of article) |
|
#4
|
|||
|
|||
|
yes usefull
Ofcours it was usefull.
I am only going to use it for someother reason. I want to make a newsletter (html) and this is going to be the editor. Good luck Bjorn ![]() |
|
#5
|
|||
|
|||
|
I have a problme with htmlarea files.
my htmlarea file is in c:\htdocs\html\ how can i added in my page? <script language="Javascript1.2"> _editor_url = "http://localhost/zcms/html"; // URL to htmlarea files ???? best regards, salai |
|
#6
|
|||
|
|||
|
Could I please get a working version of this?
Bjorn,
Thanks for clearing some things up. I have followed your fix instructions but for some reason it does not seem to submit to the db.... also this gettext.php?itemnumber=1 doesnt seem to work... Not sure what I am missing.... If your offer still stands to send out a working version it'd be much appreciated! Thanks again... -aleks |
![]() |
| Viewing: Dev Articles Community Forums > Community > Development Tutorials > Article Discussion: Using htmlArea and a Database to Maintain Content on a Website |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|