note 41496 added to function.get-magic-quotes-gpc

From: Date: Mon, 12 Apr 2004 17:49:20 +0000
Subject: note 41496 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-68030@lists.php.net to get a copy of this message
When using with MySQL You could use Captain America's code (above) and addslashes in your query string: For example: $sql = "UPDATE live_users u, live_netpals n SET u.user_nick = '".addslashes($_POST['user_nick'])."', u.user_website = '".addslashes($_POST['user_website'])."', u.user_showprofile = '".$_POST['user_showprofile']."', u.user_mailinglist = '".$_POST['user_mailinglist']."', u.user_from = '".$_POST['user_from']."' WHERE u.user_id = n.user_id AND username = '".$username."'"; This works for me and I'm sure it will work for you... ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41496 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41496&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41496&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68030) next »