PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 12th, 2002, 01:04 AM
chemaster chemaster is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 16 chemaster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Getting rid of when writting to a text file

I'm loading a plain text file into a form, making changes and posting back to the text file. Everything works fine except when I have a 'single quote' in the text area,,, then the code places a in front of the quote.

How do I post using the below code without it generating a when there is a quote ' in the form?

$stuff1 = implode("",file("company.txt"));

<textarea name="company" cols="30" rows="1">
<?php echo (htmlspecialchars($stuff1)); ?>
</textarea>

Reply With Quote
  #2  
Old November 12th, 2002, 01:19 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Getting rid of when writting to a text file

<?php echo (htmlspecialchars(stripslashes($stuff1))); ?>

Reply With Quote
  #3  
Old November 12th, 2002, 03:14 AM
hermawan's Avatar
hermawan hermawan is offline
Superman is not dead
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Jakarta, Indonesia
Posts: 552 hermawan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 21 m 55 sec
Reputation Power: 2
Send a message via ICQ to hermawan Send a message via AIM to hermawan Send a message via Yahoo to hermawan Send a message via Google Talk to hermawan Send a message via Skype to hermawan
RE: Getting rid of when writting to a text file

php Code:
Original - php Code
  1.  
  2. echo (htmlspecialchars(stripslashes($stuff1),ENT_QUOTES  ));

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Getting rid of when writting to a text file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway