<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC3%2FMySQL-Part-8%2FEnglish</id>
		<title>PHP-and-MySQL/C3/MySQL-Part-8/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC3%2FMySQL-Part-8%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;action=history"/>
		<updated>2026-05-04T04:16:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;diff=13326&amp;oldid=prev</id>
		<title>Pratik kamble at 06:28, 10 July 2014</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;diff=13326&amp;oldid=prev"/>
				<updated>2014-07-10T06:28:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;amp;diff=13326&amp;amp;oldid=564&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Pratik kamble</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;diff=564&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{| border=1 !Time !Narration |- |0:00 |Welcome back! In our previous tutorial, we have established what we are going to change and how we are going to change it. |- |0:08 |We did…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C3/MySQL-Part-8/English&amp;diff=564&amp;oldid=prev"/>
				<updated>2012-11-29T06:50:11Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{| border=1 !Time !Narration |- |0:00 |Welcome back! In our previous tutorial, we have established what we are going to change and how we are going to change it. |- |0:08 |We did…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
!Time&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|0:00&lt;br /&gt;
|Welcome back! In our previous tutorial, we have established what we are going to change and how we are going to change it.&lt;br /&gt;
|-&lt;br /&gt;
|0:08&lt;br /&gt;
|We did go through that.&lt;br /&gt;
|-&lt;br /&gt;
|0:10&lt;br /&gt;
|So, now I will test my code. &lt;br /&gt;
|-&lt;br /&gt;
|0:12&lt;br /&gt;
|If we look at our database, we have a few records here.&lt;br /&gt;
|-&lt;br /&gt;
|0:18&lt;br /&gt;
|I am going to delete David's record here because it was from another tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|0:23&lt;br /&gt;
|After the deletion, we have the records of Alex, Kyle, Emily and Dale &lt;br /&gt;
|-&lt;br /&gt;
|0:28&lt;br /&gt;
|Here I will use Kyle's record as an example and change it to a particular value.&lt;br /&gt;
|-&lt;br /&gt;
|0:33&lt;br /&gt;
|We will refresh our page and make sure it is updated.&lt;br /&gt;
|-&lt;br /&gt;
|0:38&lt;br /&gt;
|I will select &amp;quot;Kyle&amp;quot; and I will  change this to &amp;quot;Karen&amp;quot; and I will click on &amp;quot;Change&amp;quot; and here everything has disappeared.&lt;br /&gt;
|-&lt;br /&gt;
|0:45&lt;br /&gt;
|Now we will come back into our table and click on &amp;quot;Browse&amp;quot; to refresh it.&lt;br /&gt;
|-&lt;br /&gt;
|0:50&lt;br /&gt;
|we will scroll down and find that nothing has changed.&lt;br /&gt;
|-&lt;br /&gt;
|0:57&lt;br /&gt;
|I think I made a mistake. My mistake was that it was &amp;quot;name&amp;quot; before and now I will change this to &amp;quot;value&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|1:05&lt;br /&gt;
|This needs to be set to &amp;quot;value&amp;quot; instead of &amp;quot;name&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1:09&lt;br /&gt;
|&amp;quot;value&amp;quot; holds the value... of anything here that has been selected; so the value is &amp;quot;id&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:15&lt;br /&gt;
|When we submit our form, it will come through and the value will be contained within here in &amp;quot;id&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:24&lt;br /&gt;
|So, I found and fixed the problem and now I will go back and refresh.&lt;br /&gt;
|-&lt;br /&gt;
|1:30&lt;br /&gt;
|Here I will once again change &amp;quot;Kyle&amp;quot; to &amp;quot;Karen&amp;quot;. By clicking on &amp;quot;Change&amp;quot; you can see that nothing has happened.&lt;br /&gt;
|-&lt;br /&gt;
|1:36&lt;br /&gt;
|Even when I enter my database, we can see that we have got Alex, Kyle, Emily and Dale. &lt;br /&gt;
|-&lt;br /&gt;
|1:42&lt;br /&gt;
|Since we had changed &amp;quot;Kyle&amp;quot; to &amp;quot;Karen&amp;quot;, our id should have shown the changes.&lt;br /&gt;
|-&lt;br /&gt;
|1:47&lt;br /&gt;
|But when we click on &amp;quot;Browse&amp;quot;  and scroll down, we can  see that &amp;quot;Kyle&amp;quot; has now been replaced by &amp;quot;Karen&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:53&lt;br /&gt;
|Hence, you can also update values using forms. &lt;br /&gt;
|-&lt;br /&gt;
|1:57&lt;br /&gt;
|It is very easy, as long as you have a standard knowledge of &lt;br /&gt;
* php software, &lt;br /&gt;
* how to manipulate things, &lt;br /&gt;
* how to check things, &lt;br /&gt;
* how to use if statements, &lt;br /&gt;
* passing variables, &lt;br /&gt;
* particularly the posting variables etc.&lt;br /&gt;
|-&lt;br /&gt;
|2:15&lt;br /&gt;
|You will be able to learn all this, as long as you learn the basic set of these tutorials.&lt;br /&gt;
|-&lt;br /&gt;
|2:20&lt;br /&gt;
|As of now, in this tutorial, you have learnt inserting and updating and so on so forth. &lt;br /&gt;
|-&lt;br /&gt;
|2:28&lt;br /&gt;
|The last thing I will show you is how to delete.&lt;br /&gt;
|-&lt;br /&gt;
|2:33&lt;br /&gt;
|To show you how to Delete, I will close this page and  and remove this box and edit this. &lt;br /&gt;
|-&lt;br /&gt;
|2:45&lt;br /&gt;
|I will replace &amp;quot;Change&amp;quot; with &amp;quot;Delete&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|2:49&lt;br /&gt;
|Here I will be deleting records where we have a particular name shown.&lt;br /&gt;
|-&lt;br /&gt;
|2:55&lt;br /&gt;
|To do this, I will add &amp;quot;lastname&amp;quot; over here.&lt;br /&gt;
|-&lt;br /&gt;
|3:00&lt;br /&gt;
|Let us  not resend that and let us go back to &amp;quot;mysql.php&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|3:07&lt;br /&gt;
|Here we now have &amp;quot;Alex Garrett&amp;quot;, &amp;quot;Karen Headen&amp;quot; which has been changed or modified from my last example.&lt;br /&gt;
|-&lt;br /&gt;
|3:17&lt;br /&gt;
|We will click &amp;quot;Karen Headen&amp;quot; and we will click on &amp;quot;Delete&amp;quot;. This will delete the record.&lt;br /&gt;
|-&lt;br /&gt;
|3:23&lt;br /&gt;
|But it has not been deleted at the moment.&lt;br /&gt;
|-&lt;br /&gt;
|3:26&lt;br /&gt;
|Let us make sure all our records are intact first.&lt;br /&gt;
|-&lt;br /&gt;
|3:30&lt;br /&gt;
|As you can see here, we have all our records intact and I will choose to delete a particular record.&lt;br /&gt;
|-&lt;br /&gt;
|3:38&lt;br /&gt;
|Let us say delete &amp;quot;Emily Headen&amp;quot;, so I will choose the record of Emily Headen to be deleted.&lt;br /&gt;
|-&lt;br /&gt;
|3:44&lt;br /&gt;
|Now we need to submit this to a new page called &amp;quot;mysql underscore delete.php&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|3:51&lt;br /&gt;
|For this, we are going to create a new page save as mysql underscore delete.php &lt;br /&gt;
|-&lt;br /&gt;
|3:58&lt;br /&gt;
|We will do exactly the same as we had done before.&lt;br /&gt;
|-&lt;br /&gt;
|4:02&lt;br /&gt;
|We are going to &amp;quot;require&amp;quot; our connect so we need to connect to the database. &lt;br /&gt;
|-&lt;br /&gt;
|4:10&lt;br /&gt;
|Oh Sorry!  Let us get that back to &amp;quot;require connect.php&amp;quot; and we will again take the variables in.&lt;br /&gt;
|-&lt;br /&gt;
|4:22&lt;br /&gt;
|So let us type &amp;quot;todelete&amp;quot; here and that is &amp;quot;equal to&amp;quot; again a &amp;quot;POST&amp;quot; variable here.&lt;br /&gt;
|-&lt;br /&gt;
|4:29&lt;br /&gt;
|We are posting this form to this page and let us change some values over here.&lt;br /&gt;
|-&lt;br /&gt;
|4:34&lt;br /&gt;
|Let us say &amp;quot;todelete&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|4:37&lt;br /&gt;
|So we have changed our &amp;quot;select name&amp;quot; to &amp;quot;todelete&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|4:41&lt;br /&gt;
|Now, if you have a look back on this form here, I will show you the code again. &lt;br /&gt;
|-&lt;br /&gt;
|4:46&lt;br /&gt;
|Here we can see that we have our name values and our id value here for each case of each record. &lt;br /&gt;
|-&lt;br /&gt;
|4:53&lt;br /&gt;
|If we refresh, the name of our form is &amp;quot;todelete&amp;quot; and we are taking that into account for each value.&lt;br /&gt;
|-&lt;br /&gt;
|5:01&lt;br /&gt;
|If Emily's record has been selected we will delete the record where the id is equal to 3.&lt;br /&gt;
|-&lt;br /&gt;
|5:08&lt;br /&gt;
|Let us go back to our code and here we have our POST variable.&lt;br /&gt;
|-&lt;br /&gt;
|5:13&lt;br /&gt;
|Now I am going to echo out to give you an example of how it is processed.&lt;br /&gt;
|-&lt;br /&gt;
|5:19&lt;br /&gt;
|We have Emily Headen here. We have 3 there which means that we can use this to delete the id 3 in the database or rather the table.&lt;br /&gt;
|-&lt;br /&gt;
|5:30&lt;br /&gt;
|Here, again we will create a new variable and I will call it &amp;quot;mysql underscore query&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|5:41&lt;br /&gt;
|Inside here we will use a whole new set of commands.&lt;br /&gt;
|-&lt;br /&gt;
|5:45&lt;br /&gt;
|We will type in &amp;quot;DELETE FROM&amp;quot; and obviously we will specify our table.&lt;br /&gt;
|-&lt;br /&gt;
|5:51&lt;br /&gt;
|Let us type &amp;quot;people&amp;quot; and &amp;quot;WHERE id equals &amp;quot;todelete&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|5:56&lt;br /&gt;
|The &amp;quot;todelete&amp;quot; variable which is the id of the person that we selected from this list.&lt;br /&gt;
|-&lt;br /&gt;
|6:02&lt;br /&gt;
|Now let us test this. Let us say Emily Headen.&lt;br /&gt;
|-&lt;br /&gt;
|6:08&lt;br /&gt;
|Let us check in our database if Emily Headen's record still exists. &lt;br /&gt;
|-&lt;br /&gt;
|6:13&lt;br /&gt;
|Let us refresh to see if the record still exists.&lt;br /&gt;
|-&lt;br /&gt;
|6:18&lt;br /&gt;
|When I click on &amp;quot;Emily Headen&amp;quot; and click on &amp;quot;Delete&amp;quot;, nothing has happened.&lt;br /&gt;
|-&lt;br /&gt;
|6:21&lt;br /&gt;
|We have not echoed out but when we click on &amp;quot;Browse&amp;quot; to refresh, we can see that Emily's record has been deleted from the database.&lt;br /&gt;
|-&lt;br /&gt;
|6:30&lt;br /&gt;
|So in this set of tutorials, I have shown you a basic serve command like&lt;br /&gt;
* how to insert data &lt;br /&gt;
* how to read data&lt;br /&gt;
* how to modify&lt;br /&gt;
* how to delete data and &lt;br /&gt;
* how to incorporate into html forms.&lt;br /&gt;
|-&lt;br /&gt;
|6:43&lt;br /&gt;
|If I have forgotten anything, please let me know and I will add it as parts of these tutorials.&lt;br /&gt;
|-&lt;br /&gt;
|6:49&lt;br /&gt;
|Make sure you subscribe for updates from my channel. &lt;br /&gt;
|-&lt;br /&gt;
|6:53&lt;br /&gt;
|I hope you enjoyed these tutorials. Thanks for watching.&lt;br /&gt;
|-&lt;br /&gt;
|6:55&lt;br /&gt;
|This is Evan Varkey dubbing for the Spoken Tutorial Project. (Script contributed by Juanita Jayakar).&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>