Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-22-2005, 04:08 PM dealing with /'s
Skilled Talker

Posts: 68
Trades: 0
ok, so whenever i make something that writes data from a form to a file it works but if i was to write,
"Ok it's working"
i would come out
"Ok it/'s working"
how do i stop this and whys it happening?
mrpaul is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-22-2005, 06:16 PM
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
Are you sure it isn't "Ok it\'s working"? Anyways, just use str_replace("\\'", "'", $formvar);
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 12-22-2005, 07:19 PM
Skilled Talker

Posts: 68
Trades: 0
ye it prob is, thanks
mrpaul is offline
Reply With Quote
View Public Profile
 
Old 12-23-2005, 11:22 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
You'll get this problem with other special chars too, not just quotes. Use the PHP function stripslashes() to convert escaped characters back to normal.

$newstring = stripslashes($oldstring);
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Reply     « Reply to dealing with /'s
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12941 seconds with 12 queries