|
-
Apr 20th, 2006, 04:38 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] wysiwyg editors
first let me confess that i have absolutely no idea abt php and very faint idea abt html ,but i am sure that i will understand the code as i am good at other languages
so my doubt is on my website i want to put up a wysiwyg editor(or a simple text box) where any user can type his/her review and on clicking the submit button ,their review gets added to the database(mysql) and the content added to a page.
if someone can post a solution it would be really helpful.(or any helpful links)
thanks a million in advance
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Apr 20th, 2006, 05:58 PM
#2
Fanatic Member
Re: wysiwyg editors
All you need is a simple praser, like:
PHP Code:
$bodytag = str_replace("%body%", "black", "<body text='%body%'>");
Except you probably want something like:
PHP Code:
$bodytag = str_replace("\n", "<br>", $_POST['websitetext']);
(Obviously you will need to expand on that to filter out tabs, and other formating.)
-
Apr 20th, 2006, 06:30 PM
#3
Thread Starter
Frenzied Member
Re: wysiwyg editors
 Originally Posted by k1ll3rdr4g0n
All you need is a simple praser, like:
PHP Code:
$bodytag = str_replace("%body%", "black", "<body text='%body%'>");
Except you probably want something like:
PHP Code:
$bodytag = str_replace("\n", "<br>", $_POST['websitetext']);
(Obviously you will need to expand on that to filter out tabs, and other formating.)
so $bodytag is the variable to store the text that is entered in the "websitetext" object(text box object) ,am i right??
how am i then supposed to update the page which iam going to display( inside a frame) in the same page as the textbox should i use the echo "$bodytag" command ?
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Apr 20th, 2006, 09:27 PM
#4
Fanatic Member
Re: wysiwyg editors
Yup.
You could always open the file with php and output to the textbox if you want to edit it.
Or if you just display it in a frame you could just iframe it, or if you want to it properly, you can open the file with php and store it all in a variable and echo (or print, whichever you prefer) the variable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|