User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,589 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,591 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 586 | Replies: 2
Reply
Join Date: Oct 2007
Location: Chicago, IL
Posts: 8
Reputation: ztwalsh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ztwalsh ztwalsh is offline Offline
Newbie Poster

Slashes before apostrophies

  #1  
Nov 3rd, 2007
When people add comments to my site there is always a slash before apostrophies. Is there a line of code that will prevent this from happening?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2006
Posts: 32
Reputation: StatiX is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
StatiX's Avatar
StatiX StatiX is offline Offline
Light Poster

Re: Slashes before apostrophies

  #2  
Nov 3rd, 2007
  1. stripslashes($var)
where $var is the variable with the escape slashes added.
Always do what you wish you could..
Reply With Quote  
Join Date: Sep 2007
Location: Buenos Aires
Posts: 30
Reputation: chmazur is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
chmazur's Avatar
chmazur chmazur is offline Offline
Light Poster

Re: Slashes before apostrophies

  #3  
Nov 3rd, 2007
You can use stripslashes function.

string stripslashes ( string cad)
For example:
\' is changed with '
\\' is changed with \'

ch.-
Last edited by cscgal : Nov 3rd, 2007 at 11:30 pm. Reason: Fake sig snipped
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC