Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 01:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default single quote problem

Hello Everybody,
The shared server I am using has get_magic_quotes_gpc() turned on. When I insert inot the mysql DB the text shows up correctly, adcdef's, When I display it onto the page, everything after the quote mark will not display. I have tried using stripslashes() but that does not seem to work. Any suggestions?



Peace
Mike
http://www.eclecticpixel.com
http://www.homegrownmusicjam.com
__________________
Peace
Mike
http://www.eclecticpixel.com
 
Old July 8th, 2005, 07:37 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Use mysql_escape_string() before insert to db, then stripslashes() before dsiplaying it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add parameter val containing single quote prog ADO.NET 3 May 24th, 2005 09:24 AM
Undo/delete ' (single quote) in a textbox iniro VB.NET 2002/2003 Basics 1 April 6th, 2005 04:41 PM
replace single Quote qadeerahmad General .NET 3 September 6th, 2004 08:10 PM
problem caused by single quote isheikh BOOK: Beginning ASP 3.0 1 April 16th, 2004 02:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.