Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 12-04-2008, 11:36 PM   #1 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Default handling rich text in php-mysql


I want to know the process of accepting the superscript and subscript data from html textbox through php and store them in mysql database.Also support for other rich text format is required.
please help.I am using PHP 4.4.0 with mysql 5 and apache 2.
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 12-04-2008, 11:52 PM   #2 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: handling rich text in php-mysql

You can just store them as HTML. But, while passing them to the sql statement, remember to use the addslashes() function. Similarly, while retrieving the records, just use stripslashes() function.

btw I hope you know how to process form inputs with PHP. If not, plz google it.
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता
victor_rambo is offline  
Old 14-04-2008, 12:52 PM   #3 (permalink)
In The Zone
 
bukaida's Avatar
 
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
Default Re: handling rich text in php-mysql

Quote:
Originally Posted by rohan_shenoy View Post
You can just store them as HTML.
How are you going to write a superscript or subscript in textbox?When I am copying and pasting the superscript/subscript data from MS.Word, it is coming side by side in the text box.I know how to accept data from textbox, but the data itself is not in desired format.I hope you understood the problem.
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
bukaida is offline  
Old 14-04-2008, 07:55 PM   #4 (permalink)
हॉर्न ओके प्लीज़
 
victor_rambo's Avatar
 
Join Date: Sep 2007
Posts: 1,493
Default Re: handling rich text in php-mysql

^in that case, a textbox wouldn't do what you want. You should use a textarea which is converted into a WYSIWYG editor by javascript.

1. Download TinyMCE. It will convert a textarea element into WYSIWYG HTML editor.
2. Copy-paste the rich text in the WYSIWYG editor.
3. Use it as a form element.
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति

गीक होना माँगता
victor_rambo is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Rich Samsung D900i for 13.3K??!! dhan_shh Mobiles and Tablets 6 04-06-2007 11:29 PM
File handling using GCC/G++ anantkhaitan Programming 16 22-05-2007 04:19 PM
Handling /dev/dsp in C desertwind Open Source 1 04-01-2007 07:32 PM

 
Latest Threads
- by Sujeet
- by clmlbx
- by Sujeet
- by icebags

Advertisement




All times are GMT +5.5. The time now is 10:57 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2