PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

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 Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2008, 11:15 AM
Wallgod Wallgod is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 44 Wallgod User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 13 m 44 sec
Reputation Power: 5
Dreaded Apostrophe

Hi All
I find myself stumbling over the humble looking single inverted comma over and over again!

First it was while putting it in a MySQL database,
then while retrieving it,
then while escaping it if magic quote gpc is enabled on the server
then while pulling it in flash through a dynamically generated/updated XML

I have managed to solve the above by googling or experimenting or from the help of the kind folk on this forum... still the single inverted comma wont sit still

Now it has mysteriously started creating mischief when retrieved from the database and displayed in a textfield so that the user can update the text.

So if i have a string like Hello's World and it has successfully entered the MySQL database after going through mysql_real_escape_string(), it creates a problem when retrieved inside a textfield. It just doesnt show anything from the single inverted comma onwards... so it just shows
Hello

The same thing can be echoed successfully but in a textfield it fails. This problem has not existed in the past for me. I have recently changed to Ubuntu 8.04 and Bluehost... so maybe this is something to do with the server... magic_quotes_gpc is off on my server.... also i tried testing htmlspecialchars() on a string with a single inverted comma but it did nothing to it...
Please help

Many thanks in advance

Last edited by Wallgod : July 13th, 2008 at 03:53 PM.

Reply With Quote
  #2  
Old July 13th, 2008, 04:00 PM
Wallgod Wallgod is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 44 Wallgod User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 13 m 44 sec
Reputation Power: 5
Solution

As usual, this is a magical forum...
I posted the above some time ago and found the solution after experimenting a bit...

I had to just use htmlspecialchars along with ENT_QUOTES specified as the second option...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Dreaded Apostrophe


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap