{"id":660,"date":"2012-05-11T11:23:17","date_gmt":"2012-05-11T11:23:17","guid":{"rendered":"http:\/\/www.withinweb.com\/info\/?p=660"},"modified":"2012-05-11T11:23:39","modified_gmt":"2012-05-11T11:23:39","slug":"possible-way-of-dealing-with-inserting-quote-marks-into-a-database","status":"publish","type":"post","link":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/","title":{"rendered":"Possible way of dealing with inserting quote marks into a database"},"content":{"rendered":"<p>This is another possible way of dealing with quote marks for inserting data into a database :<\/p>\n<p>if (!get_magic_quotes_gpc()) {<br \/>\n$item_name = addslashes($_POST[&#8216;txtItem_Name&#8217;]);<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n$item_name = $_POST[&#8216;txtItem_Name&#8217;];<br \/>\n}<\/p>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">Dealing with quote marks for inserting data into a database<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>if (!get_magic_quotes_gpc()) {<br \/>\n$item_name = addslashes($_POST[&#8216;txtItem_Name&#8217;]);<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n$item_name = $_POST[&#8216;txtItem_Name&#8217;];<br \/>\n}<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is another possible way of dealing with quote marks for inserting data into a database : if (!get_magic_quotes_gpc()) { $item_name = addslashes($_POST[&#8216;txtItem_Name&#8217;]); } else { $item_name = $_POST[&#8216;txtItem_Name&#8217;]; } Dealing with quote marks for inserting data into a database<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/\">Read more <span class=\"screen-reader-text\">Possible way of dealing with inserting quote marks into a database<\/span><span class=\"meta-nav\"> &#8250;<\/span><\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,11],"tags":[],"class_list":["post-660","post","type-post","status-publish","format-standard","hentry","category-general-php","category-security-issues"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Possible way of dealing with inserting quote marks into a database - PHP Web Applications<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Possible way of dealing with inserting quote marks into a database - PHP Web Applications\" \/>\n<meta property=\"og:description\" content=\"This is another possible way of dealing with quote marks for inserting data into a database : if (!get_magic_quotes_gpc()) { $item_name = addslashes($_POST[&#8216;txtItem_Name&#8217;]); } else { $item_name = $_POST[&#8216;txtItem_Name&#8217;]; } Dealing with quote marks for inserting data into a database&hellip;Read more Possible way of dealing with inserting quote marks into a database &#8250;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/\" \/>\n<meta property=\"og:site_name\" content=\"PHP Web Applications\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-11T11:23:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-05-11T11:23:39+00:00\" \/>\n<meta name=\"author\" content=\"paulv\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"paulv\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/\"},\"author\":{\"name\":\"paulv\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/#\\\/schema\\\/person\\\/04da5531c302d55ffcd777fe81dbb93c\"},\"headline\":\"Possible way of dealing with inserting quote marks into a database\",\"datePublished\":\"2012-05-11T11:23:17+00:00\",\"dateModified\":\"2012-05-11T11:23:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/\"},\"wordCount\":72,\"commentCount\":0,\"articleSection\":[\"General PHP\",\"Security Issues\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/\",\"url\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/\",\"name\":\"Possible way of dealing with inserting quote marks into a database - PHP Web Applications\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/#website\"},\"datePublished\":\"2012-05-11T11:23:17+00:00\",\"dateModified\":\"2012-05-11T11:23:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/#\\\/schema\\\/person\\\/04da5531c302d55ffcd777fe81dbb93c\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Possible way of dealing with inserting quote marks into a database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/\",\"name\":\"PHP Web Applications\",\"description\":\"Information and support for products of WithinWeb.com\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/#\\\/schema\\\/person\\\/04da5531c302d55ffcd777fe81dbb93c\",\"name\":\"paulv\",\"url\":\"https:\\\/\\\/www.withinweb.com\\\/info\\\/author\\\/paulv\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Possible way of dealing with inserting quote marks into a database - PHP Web Applications","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/","og_locale":"en_US","og_type":"article","og_title":"Possible way of dealing with inserting quote marks into a database - PHP Web Applications","og_description":"This is another possible way of dealing with quote marks for inserting data into a database : if (!get_magic_quotes_gpc()) { $item_name = addslashes($_POST[&#8216;txtItem_Name&#8217;]); } else { $item_name = $_POST[&#8216;txtItem_Name&#8217;]; } Dealing with quote marks for inserting data into a database&hellip;Read more Possible way of dealing with inserting quote marks into a database &#8250;","og_url":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/","og_site_name":"PHP Web Applications","article_published_time":"2012-05-11T11:23:17+00:00","article_modified_time":"2012-05-11T11:23:39+00:00","author":"paulv","twitter_card":"summary_large_image","twitter_misc":{"Written by":"paulv"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/#article","isPartOf":{"@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/"},"author":{"name":"paulv","@id":"https:\/\/www.withinweb.com\/info\/#\/schema\/person\/04da5531c302d55ffcd777fe81dbb93c"},"headline":"Possible way of dealing with inserting quote marks into a database","datePublished":"2012-05-11T11:23:17+00:00","dateModified":"2012-05-11T11:23:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/"},"wordCount":72,"commentCount":0,"articleSection":["General PHP","Security Issues"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/","url":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/","name":"Possible way of dealing with inserting quote marks into a database - PHP Web Applications","isPartOf":{"@id":"https:\/\/www.withinweb.com\/info\/#website"},"datePublished":"2012-05-11T11:23:17+00:00","dateModified":"2012-05-11T11:23:39+00:00","author":{"@id":"https:\/\/www.withinweb.com\/info\/#\/schema\/person\/04da5531c302d55ffcd777fe81dbb93c"},"breadcrumb":{"@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.withinweb.com\/info\/possible-way-of-dealing-with-inserting-quote-marks-into-a-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.withinweb.com\/info\/"},{"@type":"ListItem","position":2,"name":"Possible way of dealing with inserting quote marks into a database"}]},{"@type":"WebSite","@id":"https:\/\/www.withinweb.com\/info\/#website","url":"https:\/\/www.withinweb.com\/info\/","name":"PHP Web Applications","description":"Information and support for products of WithinWeb.com","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.withinweb.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.withinweb.com\/info\/#\/schema\/person\/04da5531c302d55ffcd777fe81dbb93c","name":"paulv","url":"https:\/\/www.withinweb.com\/info\/author\/paulv\/"}]}},"_links":{"self":[{"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/posts\/660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/comments?post=660"}],"version-history":[{"count":4,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/posts\/660\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/posts\/660\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/media?parent=660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/categories?post=660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withinweb.com\/info\/wp-json\/wp\/v2\/tags?post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}