Jump to content

Recommended Posts

Hi,

 

there is a form with three field like news title, description, user can post heading with description(with special char), for this i have created table name called news with the following data type varchar for heading, longtext for description,

 

this is my input

 

"

heading:  - good morning to all

description: - "Dear All,

 

Greetings from ECD!!

 

A small article on “Nobody’s friend”

 

My name is Gossip.

 

I have no respect for justice.

 

I break hearts and ruin lives.

 

I am cunning, malicious and gather strength with age.

The more I am quoted, the more I am believed.

I flourish at every level of society.

 

My victims are helpless.

 

They cannot protect themselves against me because

I have no name and no face.

To track me down is impossible.

The harder you try, the more elusive I become.

 

I am nobody's friend.

 

Once I tarnish a reputation, it is never the same.

 

I topple governments and wreck marriages.

I ruin careers and cause sleepless nights, heartaches and indigestion.

 

I spawn suspicion and generate grief.

I make innocent people cry in their pillows.

 

Even my name hisses.

 

I am called GOSSIP.

 

Office gossip

Shop gossip

Party gossip

Telephone gossip

 

I make headlines and headaches.

 

REMEMBER, when you repeat a story, ask yourself:

 

Is it true?

Is it fair?

Is it necessary??

If not, do not repeat it.

 

Have a great day!!

 

Thanks & Regards

"

 

im getting this error

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's friend.

 

Once I tarnish a reputation, it is never the same.

' at line 2

Link to comment
https://forums.phpfreaks.com/topic/195292-phpmysql-doesnt-save-special-char/
Share on other sites

hi,,

 

i was used real escape string insert successfully but while showing it show like this

 

Surat has conducted a three days workshop

 

<!-- /* Font Definitions */ @font-face {font-family:\"Cambria Math\"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:\"Century Schoolbook\"; panose-1:2 4 6 4 5 5 5 2 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:\"\"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:\"Times New Roman\",\"serif\"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

\r\n

 

Dear All,

\r\n

 

 

\r\n

 

Greetings from ECD!!

\r\n

 

 

\r\n

 

A small article on “Nobody’s friend”

\r\n

 

 

\r\n

 

My name is Gossip.

 

I have no respect for justice.

 

I break hearts and ruin lives.

 

I am cunning, malicious and gather strength with age.

The more I am quoted, the more I am believed.

I flourish at every level of society.

 

My victims are helpless.

 

They cannot protect themselves against me because

I have no name and no face.

To track me down is impossible.

The harder you try, the more elusive I become.

 

I am nobody\'s friend.

 

Once I tarnish a reputation, it is never the same.

 

I topple governments and wreck marriages.

I ruin careers and cause sleepless nights, heartaches and indigestion.

 

I spawn suspicion and generate grief.

I make innocent people cry in their pillows.

 

Even my name hisses.

 

I am called GOSSIP.

 

Office gossip

Shop gossip

Party gossip

Telephone gossip

 

I make headlines and headaches.

 

REMEMBER, when you repeat a story, ask yourself:

 

Is it true?

Is it fair?

Is it necessary??

If not, do not repeat it.

\r\n

 

 

\r\n

 

Have a great day!!

\r\n

 

 

\r\n

 

Thanks & Regards

\r\n

 

 

\r\n

 

 

\r\n

 

 

\r\n

 

Chennai.

\r\n

 

 

\r\n

 

 

\r\n

hi,,

 

 

it displays with font style everything in page. i want to show what user select  color,  font family for text, it should not show like this in code

 

<!-- /* Font Definitions */ @font-face {font-family:\"Cambria Math\"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:\"Century Schoolbook\"; panose-1:2 4 6 4 5 5 5 2 3 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:647 0 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:\"\"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:\"Times New Roman\",\"serif\"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.