PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Nov 27, 2014 1:16 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Aug 01, 2012 3:05 am 
Offline
Forum Contributor

Joined: Sat Mar 31, 2012 6:50 am
Posts: 112
i have problem with slashes and quotes!...

hi,i get the word like this:
if the word is: art"ssef
i get it like this:
art"/ssef
---
sometimes get it like that too:
art
and the "ssef is removed!....can some ne help me please ?


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 3:18 am 
Offline
Forum Newbie
User avatar

Joined: Fri Jun 22, 2012 4:50 pm
Posts: 18
Try this, this should totally work, please reply if it does. :)
Syntax: [ Download ] [ Hide ]
<?php
echo ('art"seff');
?>


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 4:00 am 
Offline
Forum Contributor

Joined: Sat Mar 31, 2012 6:50 am
Posts: 112
no no man, i know thats work....but i mean php & mysql ... sorry i forgot to say thant :crazy:


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 4:31 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2775
Location: .za
When you display data from a database you can use stripslashes() to remove any slashes used to escape certain characters (like " or ') and then you should use htmlentities() to convert the characters (" and ' among others) to html-safe characters.

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 2:07 pm 
Offline
Forum Newbie
User avatar

Joined: Fri Jun 22, 2012 4:50 pm
Posts: 18
Well yes you didn't mention about "php & mysql" that's why I answered it that way.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot], PHPHelpNeeded and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group