Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP 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 9th, 2015, 06:33 PM
Registered User
Join Date: Jul 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default get_magic_quotes_gpc() function got deprecated. Please help

Hi everybody,
I am a php developer newbie. I really want to master php in my road on becoming a serious developer. I came to know that the

get_magic_quotes_gpc() function is deprecated in php 5.5 and removed. is there any function that could help in security?

Pleas take a look at this function and give your views. is this code good? Any tips and advise will help

function quote_smart($value, $handle)
// Stripslashes
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
// Quote if not integer
if (!is_numeric($value)) {
$value = "'" . mysql_real_escape_string($value, $handle) . "'";
return $value;


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compass Example Using Deprecated marfl99 BOOK: Professional Android 4 Application Development 3 April 6th, 2014 01:42 AM
Chapter 7: addPreferencesFromResource is deprecated pdevhecht BOOK: Professional Android 2 Application Development 0 December 4th, 2012 12:13 AM
Chapter 5 deprecated BigLuck BOOK: Expert PHP and MySQL 1 June 16th, 2010 11:18 AM
GenericDataSource Deprecated lizethfc JSP Basics 0 June 5th, 2003 11:08 AM

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