<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Code The World — Delete data from a MySQL database]]></title>
		<link>https://codetheworld.com/viewtopic.php?id=8</link>
		<atom:link href="https://codetheworld.com/extern.php?action=feed&amp;tid=8&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Delete data from a MySQL database.]]></description>
		<lastBuildDate>Sat, 02 Jan 2010 13:25:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Delete data from a MySQL database]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=373#p373</link>
			<description><![CDATA[<p>This would, if register_globals was set in the php.ini. It the server was using PHP5 it is unlikely however I do think that in the earlier versions of PHP4 it was turned on, an attacker could simply make the request...</p><p><a href="http://example.com/path/to/file.php?id=1">http://example.com/path/to/file.php?id=1</a></p><p>and it would delete the table with an id of 1, this is easily scriptable so that it would go through and increment the id number until all the id&#039;s were completed</p>]]></description>
			<author><![CDATA[null@example.com (Alias)]]></author>
			<pubDate>Sat, 02 Jan 2010 13:25:33 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=373#p373</guid>
		</item>
		<item>
			<title><![CDATA[Re: Delete data from a MySQL database]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=17#p17</link>
			<description><![CDATA[<p>Does this pose a potential security risk?</p>]]></description>
			<author><![CDATA[null@example.com (hotaussie)]]></author>
			<pubDate>Sun, 15 Jun 2008 02:29:27 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=17#p17</guid>
		</item>
		<item>
			<title><![CDATA[Delete data from a MySQL database]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=8#p8</link>
			<description><![CDATA[<p>Description<br />How to remove and erase stored information from a MySQL database table.</p><p>The code<br /></p><div class="codebox"><pre><code>&lt;?php

/*
 * Change the first line to whatever
 * you use to connect to the database.
 *
 * Change tablename to the name of your 
 * database table.
 *
 * This example would delete a row from
 * a table based on the id of the row.
 * You can change this to whatever you
 * want.
 */

// Your database connection code
db_connect();

$query = &quot;DELETE FROM tablename WHERE id = (&#039;$id&#039;)&quot;;

$result = mysql_query($query);

echo &quot;The data has been deleted.&quot;;

?&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Casper)]]></author>
			<pubDate>Sun, 15 Jun 2008 01:05:54 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=8#p8</guid>
		</item>
	</channel>
</rss>
