Solved

how to cancel auto escape of single quotes

Posted on 2001-08-06
3
1,711 Views
Last Modified: 2012-06-27
hi everybody

I am creating html page using the messages given by user in form. As we know the php program automatically replaces single quotes (') in user message with /' and when i display it in browser,it only prints '

Yes of course it is nice feature but when I tried to write this user message in my html it writes /' instead of '.

How to solve this problem. Please help me.

cheers
epdass
0
Comment
Question by:epdass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 50 total points
ID: 6355305
echo stripslashes($textvariable);

might be what you are looking for.

From the PHP Manual.

stripslashes
(PHP 3, PHP 4 )

stripslashes --  Un-quote string quoted with addslashes()
Description

string stripslashes (string str)


Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes are made into a single backslash.

See also addslashes().



Regards,

Richard Quadling.
0
 
LVL 3

Expert Comment

by:izwiz
ID: 6358527
Or look in your php.ini for the magic quotes directives.

0
 
LVL 2

Expert Comment

by:curri
ID: 6358529
Also, whether php quotes automatically is a configuration option (magic_quotes_gpc), so you may also set it to 0 in your ini file, or with ini_set

Orlando
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question