[NETBEANS-1870] WishList 4-9, WithList Oracle Lesson 1, Dead links removed from screencast pages

* [NETBEANS-1870] Reviewing the Asciidoc of PHP tutorials

 * [php] wishlist-lesson4

* [NETBEANS-1870] Reviewing the Asciidoc of PHP tutorials

 * [php] wishlist-lesson4

* [NETBEANS-1870] Reviewing the Asciidoc of PHP tutorials

 * [php] wishlist-lesson5
 * [php] wishlist-lesson6

*  [NETBEANS-1870]

 * [php] wishlist-lesson7
 * [php] wishlist-lesson8
 * [php] wishlist-lesson9

* [NETBEANS-1870] Reviewing the Asciidoc of PHP tutorials

* [php] dead links removed
diff --git a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account.asciidoc
index aa76e00..4aaa54d 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account.asciidoc
@@ -113,9 +113,9 @@
 
 After you choose the remote connection for your project, select whether to upload your source files on run, on save, or manually.
 
-* *On Run:* Source files are uploaded to the server when you run the project.
-* *On Save: *Every change (create, edit, rename, delete) is immediately propagated to your remote server. If the operation takes more than 1 second, a progress bar is shown.
-* *Manually:* Files are never uploaded automatically. You must use the IDE's manual upload function, described in this section.
+*On Run:* Source files are uploaded to the server when you run the project.
+*On Save:* Every change (create, edit, rename, delete) is immediately propagated to your remote server. If the operation takes more than 1 second, a progress bar is shown.
+*Manually:* Files are never uploaded automatically. You must use the IDE's manual upload function, described in this section.
 
 image::images/ftp-run-config.png[]
 
@@ -137,9 +137,9 @@
 
 For developers who must work over (S)FTP in multiple developer environments without proper version control, NetBeans IDE provides remote synchronization. Remote synchronization allows you to compare your local copy of project files with the copies on the (S)FTP server. You can upload your local copy to the server or download the server's copy to your local machine. When the copy on the server was updated after you began work on your local copy, NetBeans IDE warns you of a file conflict. When there is a file conflict, NetBeans IDE lets you diff your local version with the version on the server and decide which version to accept on a line-by-line basis.
 
-*Warning: *Remote synchronization is never 100% reliable because the timestamps on FTP servers are not 100% reliable. Version control is a safer solution.
+*Warning:* Remote synchronization is never 100% reliable because the timestamps on FTP servers are not 100% reliable. Version control is a safer solution.
 
-*Caution: *Remote synchronization works more reliably when you perform it on an entire project. You can perform remote synchronization on individual files but this has higher risk.
+*Caution:* Remote synchronization works more reliably when you perform it on an entire project. You can perform remote synchronization on individual files but this has higher risk.
 
 *To perform remote synchronization:*
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ja.asciidoc
index 78eba24..ed358a9 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ja.asciidoc
@@ -119,9 +119,9 @@
 
 プロジェクトに対してリモート接続を選択した後、どの時点(実行時、保存時、または手動)でソース・ファイルをアップロードするかを選択します。
 
-* *実行時:* ソース・ファイルは、プロジェクトを実行するときにサーバーにアップロードされます。
-* *保存時:* すべての変更(作成、編集、名前変更、削除)は、リモート・サーバーにすぐに伝播されます。操作に1秒以上かかる場合は、進捗バーが表示されます。
-* *手動:* ファイルは自動的にアップロードされません。この項で説明する、IDEの手動アップロード機能を使用する必要があります。
+*実行時:* ソース・ファイルは、プロジェクトを実行するときにサーバーにアップロードされます。
+*保存時:* すべての変更(作成、編集、名前変更、削除)は、リモート・サーバーにすぐに伝播されます。操作に1秒以上かかる場合は、進捗バーが表示されます。
+*手動:* ファイルは自動的にアップロードされません。この項で説明する、IDEの手動アップロード機能を使用する必要があります。
 
 image::images/ftp-run-config.png[]
 
@@ -143,7 +143,7 @@
 
 開発者が適切なバージョン管理をせずに複数の開発者環境でFTPまたはSFTPを操作する必要がある場合、NetBeans IDEではリモート同期が提供されます。リモート同期を使用すると、プロジェクト・ファイルのローカル・コピーを、FTPまたはSFTPサーバー上のコピーと比較できます。ローカル・コピーをサーバーにアップロードしたり、サーバーのコピーをローカル・マシンにダウンロードできます。ローカル・コピーで作業を開始した後にサーバー上のコピーが更新された場合、NetBeans IDEによって、ファイルの競合があることが警告されます。ファイルの競合がある場合は、NetBeans IDEを使用して、ローカル・バージョンとサーバー上のバージョンとの差分を取得し、行ごとにどちらのバージョンを使用するかを決定できます。
 
-*警告: *FTPサーバーのタイムスタンプは100%信頼できるわけではないため、リモート同期も100%信頼できるわけではありません。安全な解決策はバージョン管理です。
+*警告:* FTPサーバーのタイムスタンプは100%信頼できるわけではないため、リモート同期も100%信頼できるわけではありません。安全な解決策はバージョン管理です。
 
 NOTE: プロジェクト全体でリモート同期を実行すると、信頼性がより向上します。個別のファイルに対してリモート同期を実行できますが、リスクが高くなります。
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_pt_BR.asciidoc
index 6e8f6ae..5dd2970 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_pt_BR.asciidoc
@@ -119,9 +119,9 @@
 
 Após você escolher a conexão remota para seu projeto, selecione se deseja fazer upload dos seus arquivos de código-fonte na execução, ao salvar ou manualmente.
 
-* *Ao Executar:* os arquivos de Código-Fonte terão upload no servidor quando o projeto for executado.
-* *Ao salvar: *qualquer alteração (criar, editar, renomear, deletar) será imediatamente propagada para seu servidor remoto. Se a operação levar mais de 1 segundo, uma barra de andamento será mostrada.
-* *Manualmente:* os arquivos nunca terão upload automático. É preciso utilizar a função de upload do IDE, descrita nesta seção.
+*Ao Executar:* os arquivos de Código-Fonte terão upload no servidor quando o projeto for executado.
+*Ao salvar:* qualquer alteração (criar, editar, renomear, deletar) será imediatamente propagada para seu servidor remoto. Se a operação levar mais de 1 segundo, uma barra de andamento será mostrada.
+*Manualmente:* os arquivos nunca terão upload automático. É preciso utilizar a função de upload do IDE, descrita nesta seção.
 
 image::images/ftp-run-config.png[]
 
@@ -143,9 +143,9 @@
 
 Para os desenvolvedores que tiverem que trabalhar em (S)FTP em ambientes de vários desenvolvedores sem o controle de versão adequado, o NetBeans IDE fornece sincronização remota. A sincronização remota permite comparar a cópia local dos arquivos do projeto com as cópias no servidor (S)FTP. Você pode fazer upload da cópia local no servidor ou fazer download da cópia do servidor na máquina local. Quando a cópia no servidor tiver sido atualizada depois de você ter começado a trabalhar na cópia locqal, o NetBeans IDE o avisa de um conflito de arquivos. Quando houver um conflito, o NetBeans IDE permite diferenciar a versão local da versão no servidor e decidir qual versão aceitar, linha a linha.
 
-*Advertência: *a sincronização remota nunca é 100% confiável porque os timestamps nos servidores FTP não são 100% confiáveis. O controle de versão é uma solução mais segura.
+*Advertência:* a sincronização remota nunca é 100% confiável porque os timestamps nos servidores FTP não são 100% confiáveis. O controle de versão é uma solução mais segura.
 
-*Cuidado: *a sincronização remota trabalha de maneira mais confiável quando você a executa em um projeto inteiro. Você pode executar a sincronização remota em arquivos individuais, mas aí o risco é mais alto.
+*Cuidado:* a sincronização remota trabalha de maneira mais confiável quando você a executa em um projeto inteiro. Você pode executar a sincronização remota em arquivos individuais, mas aí o risco é mais alto.
 
 *Para executar a sincronização remota:*
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ru.asciidoc
index 3842562..ac41cdd 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_ru.asciidoc
@@ -119,9 +119,9 @@
 
 После выбора удаленного подключения для проекта выберите способ загрузки исходных файлов на сервер: при выполнении, при сохранении или вручную.
 
-* *При выполнении:* исходные файлы загружаются на сервер при выполнении проекта.
-* *При сохранении:* каждое изменение (создание, правка, переименование, удаление) немедленно воспроизводится на удаленном сервере. Если операция занимает более 1 секунды, отображается индикатор выполнения.
-* *Вручную:* автоматическая загрузка файлов не выполняется. В этом случае следует пользоваться функцией загрузки в ручном режиме, описанной в данном разделе.
+*При выполнении:* исходные файлы загружаются на сервер при выполнении проекта.
+*При сохранении:* каждое изменение (создание, правка, переименование, удаление) немедленно воспроизводится на удаленном сервере. Если операция занимает более 1 секунды, отображается индикатор выполнения.
+*Вручную:* автоматическая загрузка файлов не выполняется. В этом случае следует пользоваться функцией загрузки в ручном режиме, описанной в данном разделе.
 
 image::images/ftp-run-config.png[]
 
@@ -143,9 +143,9 @@
 
 Разработчики, которым необходимо использовать (S)FTP в нескольких средах разработки без правильной версии системы управления версиями IDE NetBeans обеспечивает удаленную синхронизацию. Удаленная синхронизация позволяет сравнить локальную копию файлов проекта с копиями на сервере (S)FTP. Вы можете загрузить локальные копии на сервер или загрузить копию с сервера на локальный компьютер. При обновлении копии на сервере после начала работы с локальной копией в IDE NetBeans создается предупреждение о конфликте файлов. При наличии конфликтов файлов IDE NetBeans позволяет различать локальную версию и версию на сервере и определить версию, принимаемую на построковой основе.
 
-*Предупреждение. *Удаленная синхронизация никогда не бывает надежной на 100%, поскольку временные метки FTP-серверах не являются надежными на 100%. Системы контроля версиями являются более безопасном решением.
+*Предупреждение.* Удаленная синхронизация никогда не бывает надежной на 100%, поскольку временные метки FTP-серверах не являются надежными на 100%. Системы контроля версиями являются более безопасном решением.
 
-*Внимание! *Удаленная синхронизация работает более надежно, когда она выполняется для всего проекта. Вы можете выполнять удаленную синхронизацию отдельных файлов, но риск при этом выше.
+*Внимание!* Удаленная синхронизация работает более надежно, когда она выполняется для всего проекта. Вы можете выполнять удаленную синхронизацию отдельных файлов, но риск при этом выше.
 
 *Выполнение удаленной синхронизации*
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_zh_CN.asciidoc
index bbb4acf..ebc4f1a 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/remote-hosting-and-ftp-account_zh_CN.asciidoc
@@ -116,9 +116,9 @@
 
 为项目选择远程连接后,请选择是在运行时、保存时还是手动上载源文件。
 
-* *运行时:*在运行项目时将源文件上载到服务器。
-* *保存时:*将每项更改(创建、编辑、重命名、删除)立即传播到远程服务器。如果该操作用时超过 1 秒,则将显示一个进度栏。
-* *手动:*从不自动上载文件。您必须使用此部分介绍的 IDE 的手动上载功能。
+*运行时:*在运行项目时将源文件上载到服务器。
+*保存时:*将每项更改(创建、编辑、重命名、删除)立即传播到远程服务器。如果该操作用时超过 1 秒,则将显示一个进度栏。
+*手动:*从不自动上载文件。您必须使用此部分介绍的 IDE 的手动上载功能。
 
 image::images/ftp-run-config.png[]
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-apigen.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-apigen.asciidoc
index 880cd7d..a79a0d7 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-apigen.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-apigen.asciidoc
@@ -38,6 +38,4 @@
 Time: 7:22 
 link:http://bits.netbeans.org/media/php-apigen.flv[+Download+] [17.5 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: ApiGen Screencast[+Send Feedback on This Tutorial+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds.asciidoc
index dd7907c..44df8c6 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds.asciidoc
@@ -33,9 +33,9 @@
 |This screencast shows how to set up PHP applications on Hudson and Jenkins continuous build servers. It includes an overview of what continuous builds are and why they can be useful with PHP applications. The screencast also shows how to launch a build job for a PHP application and how to access the results.
 
 Author: Jeff Rubinoff
-Time: 9:21 
+Time: 9:21
+
 link:http://bits.netbeans.org/media/php-continuous-builds.flv[+Download+] [21.7 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%20Continuous%20Builds%20Screencast[+Send Feedback on This Tutorial+]
- |  
+
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ja.asciidoc
index c08e7e6..3e63cb2 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ja.asciidoc
@@ -34,8 +34,7 @@
 
 作成者: Jeff Rubinoff
 時間: 9:21
+
 link:http://bits.netbeans.org/media/php-continuous-builds.flv[+ダウンロード+] (21.7MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%20Continuous%20Builds%20Screencast[+このチュートリアルに関するご意見をお寄せください+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_pt_BR.asciidoc
index 1d35fae..ea177f7 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_pt_BR.asciidoc
@@ -34,8 +34,7 @@
 
 Autor: Jeff Rubinoff
 Hora: 9:21 
+
 link:http://bits.netbeans.org/media/php-continuous-builds.flv[+Download+] [21.7 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%20Continuous%20Builds%20Screencast[+Enviar Feedback neste Tutorial+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ru.asciidoc
index b70b479..22aa0fb 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_ru.asciidoc
@@ -34,8 +34,7 @@
 
 Автор: Джеф Рубинов (Jeff Rubinoff)
 Время: 9:21 
+
 link:http://bits.netbeans.org/media/php-continuous-builds.flv[+Загрузить+] [21,7 МБ]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%20Continuous%20Builds%20Screencast[+Отправить отзыв по этому учебному курсу+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_zh_CN.asciidoc
index 93c7fdf..e64ca62 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-continuous-builds_zh_CN.asciidoc
@@ -34,8 +34,7 @@
 
 作者:Jeff Rubinoff
 播放时长:9:21 
+
 link:http://bits.netbeans.org/media/php-continuous-builds.flv[+下载+] [21.7 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%20Continuous%20Builds%20Screencast[+发送有关此教程的反馈意见+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-doctrine2.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-doctrine2.asciidoc
index 349f35e..0294ed6 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-doctrine2.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-doctrine2.asciidoc
@@ -39,8 +39,7 @@
 
 Author: Jeff Rubinoff
 Time: 11:21 
+
 link:http://bits.netbeans.org/media/php-doctrine2.flv[+Download+] [23.6 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20Doctrine%202%20Screencast[+Send Feedback on This Tutorial+]
- |  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-php54.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-php54.asciidoc
index bac81fb..e9dc1e5 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-php54.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-php54.asciidoc
@@ -34,8 +34,7 @@
 
 Author: Jeff Rubinoff
 Time: 11:52 
-link:http://bits.netbeans.org/media/php54.flv[+Download+] [24.4 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20PHP%205.4%20Screencast[+Send Feedback on This Tutorial+]
- |  
+link:http://bits.netbeans.org/media/php54.flv[+Download+] [24.4 MB]
+ 
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc.asciidoc
index 9c38262..28320f5 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc.asciidoc
@@ -36,8 +36,7 @@
 
 Author: Jeff Rubinoff
 Time: 7:11 
+
 link:http://bits.netbeans.org/media/phpdoc.flv[+Download+] [16.0 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHPDoc Screencast[+Send Feedback on This Tutorial+]
- |   
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ja.asciidoc
index 1a766d9..8420bbc 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ja.asciidoc
@@ -36,8 +36,7 @@
 
 作成者: Jeff Rubinoff
 時間: 7:11
+
 link:http://bits.netbeans.org/media/phpdoc.flv[+ダウンロード+] (16.0MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHPDoc Screencast[+このチュートリアルに関するご意見をお寄せください+]
- |   
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_pt_BR.asciidoc
index b737c56..2edd6b6 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_pt_BR.asciidoc
@@ -36,8 +36,7 @@
 
 Autor: Jeff Rubinoff
 Duração: 7:11 
+
 link:http://bits.netbeans.org/media/phpdoc.flv[+Download+] [16.0 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHPDoc Screencast[+Enviar Feedback neste Tutorial+]
- |   
-|===
+|===
\ No newline at end of file
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ru.asciidoc
index 38b4220..317f0cf 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_ru.asciidoc
@@ -36,8 +36,7 @@
 
 Автор: Джеф Рубинов (Jeff Rubinoff)
 Продолжительность: 7:11 
+
 link:http://bits.netbeans.org/media/phpdoc.flv[+Загрузить+] [16 МБ]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHPDoc Screencast[+Отправить отзыв по этому учебному курсу+]
- |   
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_zh_CN.asciidoc
index b14802f..802408c 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-phpdoc_zh_CN.asciidoc
@@ -36,8 +36,7 @@
 
 作者:Jeff Rubinoff
 播放时长:7:11 
-link:http://bits.netbeans.org/media/phpdoc.flv[+下载+] [16.0 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHPDoc Screencast[+发送有关此教程的反馈意见+]
- |   
+link:http://bits.netbeans.org/media/phpdoc.flv[+下载+] [16.0 MB]
+ 
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring.asciidoc
index 4415626..4d4acac 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring.asciidoc
@@ -39,8 +39,7 @@
 
 Author: Jeff Rubinoff
 Time: 8:47 
-link:http://bits.netbeans.org/media/rename-refactoring.flv[+Download+] [18.3 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHP Rename Refactoring Screencast[+Send Feedback on This Tutorial+]
- |   
+link:http://bits.netbeans.org/media/rename-refactoring.flv[+Download+] [18.3 MB]
+  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ja.asciidoc
index f980f4c..9cb001d 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ja.asciidoc
@@ -39,8 +39,7 @@
 
 作成者: Jeff Rubinoff
 時間: 8:47
-link:http://bits.netbeans.org/media/rename-refactoring.flv[+ダウンロード+] (18.3MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHP Rename Refactoring Screencast[+このチュートリアルに関するご意見をお寄せください+]
- |   
+link:http://bits.netbeans.org/media/rename-refactoring.flv[+ダウンロード+] (18.3MB)
+ 
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_pt_BR.asciidoc
index 8a493b7..7b8383e 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_pt_BR.asciidoc
@@ -40,7 +40,5 @@
 Autor: Jeff Rubinoff
 Hora: 8:47 
 link:http://bits.netbeans.org/media/rename-refactoring.flv[+Download+] [18.3 MB]
-
-link:/about/contact_form.html?to=3&subject=Feedback: PHP Rename Refactoring Screencast[+Enviar Feedback neste Tutorial+]
- |   
+ 
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ru.asciidoc
index 567c076..cded7d9 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_ru.asciidoc
@@ -39,8 +39,7 @@
 
 Автор: Джеф Рубинов (Jeff Rubinoff)
 Продолжительность: 8:47 
-link:http://bits.netbeans.org/media/rename-refactoring.flv[+Загрузить+] [18,3 МБ]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHP Rename Refactoring Screencast[+Отправить отзыв по этому учебному курсу+]
- |   
+link:http://bits.netbeans.org/media/rename-refactoring.flv[+Загрузить+] [18,3 МБ]
+   
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_zh_CN.asciidoc
index 4c72f25..6fc70d0 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-rename-refactoring_zh_CN.asciidoc
@@ -39,8 +39,7 @@
 
 作者:Jeff Rubinoff
 播放时长:8:47 
-link:http://bits.netbeans.org/media/rename-refactoring.flv[+下载+] [18.3MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: PHP Rename Refactoring Screencast[+发送有关此教程的反馈意见+]
- |   
+link:http://bits.netbeans.org/media/rename-refactoring.flv[+下载+] [18.3MB]
+  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty.asciidoc
index d0d21aa..f19e3a3 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty.asciidoc
@@ -40,8 +40,7 @@
 
 Author: Jeff Rubinoff
 Time: 6:44 
-link:http://bits.netbeans.org/media/smarty-framework.flv[+Download+] [16.2 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: Smarty Screencast[+Send Feedback on This Tutorial+]
- |   
+link:http://bits.netbeans.org/media/smarty-framework.flv[+Download+] [16.2 MB]
+  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ja.asciidoc
index 343cf1a..e2eec5c 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ja.asciidoc
@@ -40,8 +40,7 @@
 
 作成者: Jeff Rubinoff
 時間: 6:44
-link:http://bits.netbeans.org/media/smarty-framework.flv[+ダウンロード+] (16.2MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: Smarty Screencast[+このチュートリアルに関するご意見をお寄せください+]
- |   
+link:http://bits.netbeans.org/media/smarty-framework.flv[+ダウンロード+] (16.2MB)
+  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_pt_BR.asciidoc
index bcb3e00..20afcdf 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_pt_BR.asciidoc
@@ -40,8 +40,7 @@
 
 Autor: Jeff Rubinoff
 Hora: 6:44 
-link:http://bits.netbeans.org/media/smarty-framework.flv[+Download+] [16.2 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: Smarty Screencast[+Enviar Feedback neste Tutorial+]
- |   
+link:http://bits.netbeans.org/media/smarty-framework.flv[+Download+] [16.2 MB]
+ 
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ru.asciidoc
index aa2e001..26d74d8 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_ru.asciidoc
@@ -40,8 +40,7 @@
 
 Автор: Джеф Рубинов (Jeff Rubinoff)
 Продолжительность: 6:44 
-link:http://bits.netbeans.org/media/smarty-framework.flv[+Загрузить+] [16,2 МБ]
 
-link:/about/contact_form.html?to=3&subject=Feedback: Smarty Screencast[+Отправить отзыв по этому учебному курсу+]
- |   
+link:http://bits.netbeans.org/media/smarty-framework.flv[+Загрузить+] [16,2 МБ]
+   
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_zh_CN.asciidoc
index b19ffd6..fe9a116 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/screencast-smarty_zh_CN.asciidoc
@@ -40,8 +40,7 @@
 
 作者:Jeff Rubinoff
 播放时长:6:44 
-link:http://bits.netbeans.org/media/smarty-framework.flv[+下载+] [16.2 MB]
 
-link:/about/contact_form.html?to=3&subject=Feedback: Smarty Screencast[+发送有关此教程的反馈意见+]
- |   
+link:http://bits.netbeans.org/media/smarty-framework.flv[+下载+] [16.2 MB]
+  
 |===
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4.asciidoc
index e1a0ebc..b73078d 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4.asciidoc
@@ -40,60 +40,26 @@
 :description: Lesson 4: Optimizing the Code with Classes and Objects - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lesson 4: Optimizing the Code with Classes and Objects
 
+In this lesson you optimize the code to facilitate maintaining it in the future. This affects the files  `createNewWisher.php`  and  `wishlist.php` . Additionally, a new file called  `db.php`  is created.
 
-Tutorial contents:
+Your application's code contains several similar blocks with queries to the database. To make the code easier to read and maintain in the future, you can extract these blocks, implement them as functions of a separate class called  `WishDB` , and place  `WishDB`  in  `db.php` . Afterwards you can include the  `db.php`  file in any PHP file and use any <<includedFunctions,function from WishDB>> without code duplication. Such an approach ensures that any changes to queries or functions will be made in one place and you will not have to parse the entire application code.
 
-1. link:wish-list-tutorial-main-page.html[+Creating a Database Driven Application With PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. link:wish-list-oracle-lesson1.html[+Creating Oracle Database Tables+]
-3. link:wish-list-lesson2.html[+Designing the Application. Reading from the Database +]
-4. link:wish-list-lesson3.html[+Creating a New Application User+]
-5. 
-*=> Optimizing the Code*
-
-* <<previousLessonSourceCode,Application Source Code from the Previous Lesson>>
-* <<createDbPhpFile,Creating the db.php File>>
-* <<wishDBClass,Creating the WishDB Class>>
-* <<instantiate-wishdb,Instantiating the WishDB Class>>
-* <<wishdb-constructor,Adding a Constructor to the WishDB Class>>
-* <<includedFunctions,Functions in the WishDB Class>>
-* <<getIDByName,Function get_wisherID_by_name>>
-* <<getWishesByID,Function get_wishes_by_wisher_id>>
-* <<createWisher,Function create_wisher>>
-* <<refactoring,Refactoring Your Application Code>>
-* <<refactoringWishlistFile,Refactoring the wishlist.php File>>
-* <<refactoringCreateNewWisher,Refactoring the createNewWisher.php File>>
-* <<lessonResultSourceCode,Application Source Code after the Current Lesson Is Completed>>
-6. link:wish-list-lesson5.html[+Adding Security. Implementing Application User Logon+]
-7. link:wish-list-lesson6.html[+Adding a New Wish to the Database+]
-8. link:wish-list-lesson7.html[+Updating and Deleting Entries in the Database+]
-9. link:wish-list-lesson8.html[+Making the Application Look Better Using the CSS Technology+]
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
-In this lesson you optimize the code to facilitate maintaining it in the future. This affects the files  ``createNewWisher.php``  and  ``wishlist.php`` . Additionally, a new file called  ``db.php``  is created.
-
-Your application's code contains several similar blocks with queries to the database. To make the code easier to read and maintain in the future, you can extract these blocks, implement them as functions of a separate class called  ``WishDB`` , and place  ``WishDB``  in  ``db.php`` . Afterwards you can include the  ``db.php``  file in any PHP file and use any <<includedFunctions,function from WishDB>> without code duplication. Such an approach ensures that any changes to queries or functions will be made in one place and you will not have to parse the entire application code.
-
-When you use a function from WishDB, you do not change the value of any of WishDB's variables. Instead, you use the WishDB class as a blueprint for creating an object of WishDB, and you change the values of variables in that object. When you finish working with that object, it is destroyed. Because the values of the WishDB class itself are never changed, you can reuse the class an unlimited number of times. In some cases you may want to have multiple instances of a class in existance at the same time, and in other cases you may prefer a "singleton" class, where you only have one instance in existance at any one time. WishDB in this tutorial is a singleton class.
+When you use a function from WishDB, you do not change the value of any of WishDB's variables. Instead, you use the WishDB class as a blueprint for creating an object of WishDB, and you change the values of variables in that object. When you finish working with that object, it is destroyed. Because the values of the WishDB class itself are never changed, you can reuse the class an unlimited number of times. In some cases you may want to have multiple instances of a class in existence at the same time, and in other cases you may prefer a "singleton" class, where you only have one instance in existence at any one time. WishDB in this tutorial is a singleton class.
 
 Note that the term for creating an object of a class is "instantiating" that class, and that another word for an object is an "instance" of a class. The general term for programming with classes and objects is "object-oriented programming," or OOP. PHP 5 uses a sophisticated OOP model. See link:http://us3.php.net/zend-engine-2.php[+php.net+] for more information.
 
-In this tutorial, you move the database call functionality from individual PHP files to the WishDB class. Users of MySQL also replace the procedural-style  ``mysqli``  calls with object-oriented calls. This is in keeping with new, object-oriented design of the application
+In this tutorial, you move the database call functionality from individual PHP files to the WishDB class. Users of MySQL also replace the procedural-style  `mysqli`  calls with object-oriented calls. This is in keeping with new, object-oriented design of the application
 
 The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
 
-
-
+[[previousLessonSourceCode]]
 == Application Source Code from the Previous Lesson
 
 MySQL users: Click link:https://netbeans.org/files/documents/4/1929/lesson3.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
 Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson3.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-
+[[createDbPhpFile]]
 == Creating the db.php File
 
 Create a new subfolder in the Source Files folder. Name the folder Includes. Create a new file named db.php and place it in Includes. Later you can add more files to this folder that will be included in other PHP files.
@@ -106,82 +72,92 @@
 4. In the File Name field, type db. Then click Finish.
 
 
+[[wishDBClass]]
 == Creating the WishDB Class
 
-To create the WishDB class, you need to initialize the variables of the class and implement a constructor of the class. MySQL users please note that the WishDB class _extends_  ``mysqli`` . This means that WishDB _inherits_ the functions and other characteristics of the PHP mysqli class. You will see the importance of this when you add  ``mysqli `` functions to the class.
+To create the WishDB class, you need to initialize the variables of the class and implement a constructor of the class. MySQL users please note that the WishDB class _extends_  `mysqli` . This means that WishDB _inherits_ the functions and other characteristics of the PHP mysqli class. You will see the importance of this when you add  `mysqli ` functions to the class.
 
-Open the file db.php and create the WishDB class. In the class, declare database configuration variables for storing the name and password of the database owner (user), the name of the database, and the database host. All these variable declarations are "private," meaning that the initial values in the declarations cannot be accessed from outside the WishDB class (See link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]). You also declare the private _ static_  ``$instance``  variable, which stores the instance of WishDB. The "static" keyword means that functions in the class can access the variable even when there is no instance of the class.
+Open the file db.php and create the WishDB class. In the class, declare database configuration variables for storing the name and password of the database owner (user), the name of the database, and the database host. All these variable declarations are "private," meaning that the initial values in the declarations cannot be accessed from outside the WishDB class (See link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]). You also declare the private _ static_  `$instance`  variable, which stores the instance of WishDB. The "static" keyword means that functions in the class can access the variable even when there is no instance of the class.
 
 *For MySQL Database:*
 
-
-[source,java]
+[source,php]
 ----
 
 class WishDB extends mysqli {
 
-
     // single instance of self shared among all instances
     private static $instance = null;
 
-
     // db connection config vars
     private $user = "phpuser";
     private $pass = "phpuserpw";
     private $dbName = "wishlist";
     private $dbHost = "localhost";
+
 }
+
 ----
 
-*For Oracle Database: *
+*For Oracle Database:*
 
-
-[source,java]
+[source,php]
 ----
 
-class WishDB {// single instance of self shared among all instances
-private static $instance = null;// db connection config vars
-private $user = "phpuser";
-private $pass = "phpuserpw";
-private $dbName = "wishlist";
-private $dbHost = "localhost/XE";
-private $con = null;}        
-----
+class WishDB {
 
+    // single instance of self shared among all instances
+    private static $instance = null;
+
+    // db connection config vars
+    private $user = "phpuser";
+    private $pass = "phpuserpw";
+    private $dbName = "wishlist";
+    private $dbHost = "localhost/XE";
+    private $con = null;
+
+}
+
+----
 
 [[instantiate-wishdb]]
 == Instantiating the WishDB class
 
-For other PHP files to use functions in the WishDB class, these PHP files need to call a function that creates an object of ("instantiates") the WishDB class. WishDB is designed as a link:http://www.phpclasses.org/browse/package/1151.html[+singleton class+], meaning that only one instance of the class is in existance at any one time. It is therefore useful to prevent any external instantiation of WishDB, which could create duplicate instances.
+For other PHP files to use functions in the WishDB class, these PHP files need to call a function that creates an object of ("instantiates") the WishDB class. WishDB is designed as a link:http://www.phpclasses.org/browse/package/1151.html[+singleton class+], meaning that only one instance of the class is in existence at any one time. It is therefore useful to prevent any external instantiation of WishDB, which could create duplicate instances.
 
 Inside the WishDB class, type or paste the following code:
 
-
-[source,java]
+[source,php]
 ----
 
- //This method must be static, and must return an instance of the object if the object
- //does not already exist.
- public static function getInstance() {
-   if (!self::$instance instanceof self) {
-     self::$instance = new self;
-   }
-   return self::$instance;
- }
+// This method must be static, and must return an instance of the object if the object
+// does not already exist.
 
- // The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
- // thus eliminating the possibility of duplicate objects.
- public function __clone() {
-   trigger_error('Clone is not allowed.', E_USER_ERROR);
- }
- public function __wakeup() {
-   trigger_error('Deserializing is not allowed.', E_USER_ERROR);
- }
+public static function getInstance() {
+
+  if (!self::$instance instanceof self) {
+    self::$instance = new self;
+  }
+
+  return self::$instance;
+}
+
+// The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
+// thus eliminating the possibility of duplicate objects.
+ 
+public function __clone() {
+  trigger_error('Clone is not allowed.', E_USER_ERROR);
+}
+
+public function __wakeup() {
+  trigger_error('Deserializing is not allowed.', E_USER_ERROR);
+}
+
 ----
 
-The  ``getInstance``  function is "public" and "static." "Public" means that it can be freely accessed from outside the class. "Static" means that the function is available even when the class has not been instantiated. As the  ``getInstance``  function is called to instantiate the class, it must be static. Note that this function accesses the static  ``$instance``  variable and sets its value as the instance of the class.
+The  `getInstance`  function is "public" and "static." "Public" means that it can be freely accessed from outside the class. "Static" means that the function is available even when the class has not been instantiated. As the  `getInstance`  function is called to instantiate the class, it must be static. Note that this function accesses the static  `$instance`  variable and sets its value as the instance of the class.
 
-The double-colon (::), called the Scope Resolution Operator, and the  ``self``  keyword are used to access static functions.  ``Self``  is used from within the class definition to refer to the class itself. When the double-colon is used from outside the class definition, the name of the class is used instead of  ``self`` . See link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+php.net on the Scope Resolution Operator+].
+The double-colon (::), called the Scope Resolution Operator, and the  `self`  keyword are used to access static functions.  `Self`  is used from within the class definition to refer to the class itself. When the double-colon is used from outside the class definition, the name of the class is used instead of  `self` . See link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+php.net on the Scope Resolution Operator+].
 
 
 [[wishdb-constructor]]
@@ -194,32 +170,46 @@
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-// private constructorprivate function __construct() {parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);if (mysqli_connect_error()) {exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}parent::set_charset('utf-8');}
+// private constructor
+private function __construct() {
+
+  parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);
+  
+  if (mysqli_connect_error()) {
+    exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
+  }
+
+  parent::set_charset('utf-8');
+}
+
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 // private constructor
 private function __construct() {
+
     $this->con = oci_connect($this->user, $this->pass, $this->dbHost);
+
     if (!$this->con) {
         $m = oci_error();
         echo $m['message'], "\n";
         exit;
     }
 }
+
 ----
 
-Note the use of the pseudovariable  ``$this``  instead of the variables  ``$con`` ,  ``$dbHost`` ,  ``$user`` , or  ``$pass`` . The pseudovariable  ``$this``  is used when a method is called from within an object context. It refers to the value of a variable within that object.
+Note the use of the pseudovariable  `$this`  instead of the variables  `$con` ,  `$dbHost` ,  `$user` , or  `$pass` . The pseudovariable  `$this`  is used when a method is called from within an object context. It refers to the value of a variable within that object.
 
-
+[[includedFunctions]]
 == Functions in the WishDB Class
 
 In this lesson you will implement the following functions of the WishDB class:
@@ -228,7 +218,7 @@
 * <<getWishesByID,get_wishes_by_wisher_id>> for retrieving a list of wishes of the wisher with a specific id
 * <<createWisher,create_wisher>> for adding a new wisher record to the table wishers
 
-
+[[getIDByName]]
 === Function get_wisher_id_by_name
 
 The function requires the name of a wisher as the input parameter and returns the wisher's id. 
@@ -238,34 +228,56 @@
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wisher_id_by_name($name) {$name = $this->real_escape_string($name);$wisher = $this->query("SELECT id FROM wishers WHERE name = '". $name . "'");
-    if ($wisher->num_rows > 0){$row = $wisher->fetch_row();return $row[0];} elsereturn null;
+public function get_wisher_id_by_name($name) {
+  
+  $name = $this->real_escape_string($name);
+  $wisher = $this->query("SELECT id FROM wishers WHERE name = '" . $name . "'");
+
+  if ($wisher->num_rows > 0){
+    $row = $wisher->fetch_row();
+    return $row[0];
+  } else {
+    return null;
+  }
 }
+
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wisher_id_by_name($name) {
+    
     $query = "SELECT id FROM wishers WHERE name = :user_bv";
     $stid = oci_parse($this->con, $query);
+    
     oci_bind_by_name($stid, ':user_bv', $name);
     oci_execute($stid);
-//Because user is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);if ($row) return $row["ID"];elsereturn null;
+    
+    //Because user is a unique value I only expect one row
+    $row = oci_fetch_array($stid, OCI_ASSOC);
+
+    if ($row) {
+      return $row["ID"];
+    } else {
+      return null;
+    }
 }
+
 ----
-The code block executes the query  ``SELECT ID FROM wishers WHERE name = [variable for name of the wisher]`` . The query result is an array of IDs from the records that meet the query. If the array is not empty this automatically means that it contains one element because the field name is specified as UNIQUE during the table creation. In this case the function returns the first element of the  ``$result``  array (the element with the zero numbered). If the array is empty the function returns null.
 
-*Security Note:* For the MySQL database, the  ``$name `` string is escaped in order to prevent SQL injection attacks. See link:http://en.wikipedia.org/wiki/SQL_injection[+Wikipedia on SQL injections+] and the link:http://us3.php.net/mysql_real_escape_string[+mysql_real_escape_string documentation+]. Although in the context of this tutorial you are not at risk of harmful SQL injections, it is best practice to escape strings in MySQL queries that would be at risk of such an attack. The Oracle database avoids this issue by using bind variables.
+The code block executes the query  `SELECT ID FROM wishers WHERE name = [variable for name of the wisher]` . The query result is an array of IDs from the records that meet the query. If the array is not empty this automatically means that it contains one element because the field name is specified as UNIQUE during the table creation. In this case the function returns the first element of the  `$result`  array (the element with the zero numbered). If the array is empty the function returns null.
+
+*Security Note:* For the MySQL database, the  `$name ` string is escaped in order to prevent SQL injection attacks. See link:http://en.wikipedia.org/wiki/SQL_injection[+Wikipedia on SQL injections+] and the link:http://us3.php.net/mysql_real_escape_string[+mysql_real_escape_string documentation+]. Although in the context of this tutorial you are not at risk of harmful SQL injections, it is best practice to escape strings in MySQL queries that would be at risk of such an attack. The Oracle database avoids this issue by using bind variables.
 
 
+[[getWishesByID]]
 === Function get_wishes_by_wisher_id
 
 The function requires the id of a wisher as the input parameter and returns the wishes registered for the wisher.
@@ -274,33 +286,38 @@
 
 *For the MySQL database:*
 
-
-[source,java]
+[source,php]
 ----
 
-public function get_wishes_by_wisher_id($wisherID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);}
+public function get_wishes_by_wisher_id($wisherID) {
+  return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+}
+
 ----
 
 *For the Oracle database:*
 
-
-[source,java]
+[source,php]
 ----
 
 public function get_wishes_by_wisher_id($wisherID) {
-    $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ":id_bv", $wisherID);
-    oci_execute($stid);
-    return $stid;
+  
+  $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
+  $stid = oci_parse($this->con, $query);
+  
+  oci_bind_by_name($stid, ":id_bv", $wisherID);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
 
-The code block executes the query  ``"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID``  and returns a resultset which is an array of records that meet the query. (The Oracle database uses a bind variable for database performance and security reasons.) The selection is performed by the wisherID, which is the foreign key for the  ``wishes `` table.
+The code block executes the query  `"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID`  and returns a resultset which is an array of records that meet the query. (The Oracle database uses a bind variable for database performance and security reasons.) The selection is performed by the wisherID, which is the foreign key for the  `wishes ` table.
 
-NOTE: You do not need the  ``id``  value until Lesson 7.
+NOTE: You do not need the  `id`  value until Lesson 7.
 
-
+[[createWisher]]
 === Function create_wisher
 
 The function creates a new record in the wishers table. The function requires the name and password of a new wisher as the input parameters and does not return any data.
@@ -309,56 +326,73 @@
 
 *For the MySQL database:*
 
-
-[source,java]
+[source,php]
 ----
 
-public function create_wisher ($name, $password){
-    $name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
+public function create_wisher ($name, $password) {
+
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+
+  return $this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
 }
+
 ----
 
 *For the Oracle database:*
 
-
-[source,java]
+[source,php]
 ----
 
 public function create_wisher($name, $password) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':user_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
+
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($this->con, $query);
+
+  oci_bind_by_name($stid, ':user_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
-The code block executes the query  ``"INSERT wishers (Name, Password) VALUES ([variables representing name and password of new wisher])`` . The query adds a new record to the "wishers" table with the fields "name" and "password" filled in with the values of  ``$name``  and  ``$password``  respectively.
+
+The code block executes the query  `"INSERT wishers (Name, Password) VALUES ([variables representing name and password of new wisher])` . The query adds a new record to the "wishers" table with the fields "name" and "password" filled in with the values of  `$name`  and  `$password`  respectively.
 
 
+[[refactoring]]
 == Refactoring Your Application Code
 
 Now that you have a separate class for working with the database, you can replace duplicated blocks with calls to the relevant functions from this class. This will help avoid misspelling and inconsistency in the future. Code optimization that does not affect the functionality is called refactoring.
 
 
+[[refactoringWishlistFile]]
 === Refactoring the wishlist.php File
 
 Start with the wishlist.php file because it is short and the improvements will be more illustrative.
 
-1. At the top of the <?php ?> block, enter the following line to enable the use of the  ``db.php``  file:
+1. At the top of the <?php ?> block, enter the following line to enable the use of the  `db.php`  file:
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
-2. Replace the code that connects to the database and gets the ID of the wisher with a call to the  ``get_wisher_id_by_name``  function.
+2. Replace the code that connects to the database and gets the ID of the wisher with a call to the  `get_wisher_id_by_name`  function.
 
 For the *MySQL database*, the code you replace is:
 
-[.line-through]#$con = mysqli_connect("localhost", "phpuser", "phpuserpw");
+[source,php]
+----
+
+// to remove
+
+ $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
@@ -367,211 +401,271 @@
 $user = mysqli_real_escape_string($con, $_GET['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='" . $user . "'");
 if (mysqli_num_rows($wisher) < 1) {
-    exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
+  exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
 }
-$row = mysqli_fetch_row($wisher);$wisherID = $row[0];
-mysqli_free_result($wisher);#
+$row = mysqli_fetch_row($wisher);
+$wisherID = $row[0];
+mysqli_free_result($wisher);
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+// to replace
+
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
+----
 
 For the *Oracle database*, the code you replace is:
 
-[.line-through]#$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE");
 if (!$con) {
-   $m = oci_error();
-   echo $m['message'], "\n";
-   exit;
-}
-$query = "SELECT id FROM wishers WHERE name = :user_bv";
+  $m = oci_error();
+  echo $m['message'], "\n";
+  exit;
+}        
+$query = "SELECT ID FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
-$user = $_GET["user"];
+$user = $_GET['user'];
 
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
-//Because user is a unique value I only expect one row$row = oci_fetch_array($stid, OCI_ASSOC);
+//Because user is a unique value I only expect one row
+$row = oci_fetch_array($stid, OCI_ASSOC);
 if (!$row) {
-    echo("The person " . $user . " is not found. Please check the spelling and try again" );exit;}
-$wisherID = $row["ID"]; #
+  echo("The person " . $user . " is not found. Please check the spelling and try again" );
+  exit;
+}
+$wisherID = $row['ID']; 
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
 ----
 
-The new code first calls the  ``getInstance``  function in WishDB. The  ``getInstance``  function returns an instance of WishDB, and the code calls the  ``get_wisher_id_by_name``  function within that instance. If the requested wisher is not found in the database, the code kills the process and displays an error message.
+The new code first calls the  `getInstance`  function in WishDB. The  `getInstance`  function returns an instance of WishDB, and the code calls the  `get_wisher_id_by_name`  function within that instance. If the requested wisher is not found in the database, the code kills the process and displays an error message.
 
 No code is necessary here for opening a connection to the database. The connection is opened by the constructor of the WishDB class. If the name and/or password changes, you need to update only the relevant variables of the WishDB class.
 
-3. Replace the code that gets wishes for a wisher identified by ID with code that calls the  ``get_wishes_by_wisher_id``  function.
+3. Replace the code that gets wishes for a wisher identified by ID with code that calls the  `get_wishes_by_wisher_id`  function.
 
 For the *MySQL database*, the code you replace is:
 
-[.line-through]#$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=". $wisherID);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+
+// to replace      
+ 
+$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
 
 For the *Oracle database*, the code you replace is:
 
-[.line-through]#$query = "select * from wishes where wisher_id = :id_bv";$stid = oci_parse($con, $query);oci_bind_by_name($stid, ":id_bv", $wisherID);oci_execute($stid);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$query = "SELECT description, due_date FROM wishes WHERE wisher_id = :id_bv";
+$stid = oci_parse($con, $query);
+oci_bind_by_name($stid, ":id_bv", $wisherID);
+oci_execute($stid);
+
+// to replace
+
+$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
+
 4. Remove the line that closes the database connection.
 
-[source,java]
+[source,php]
 ----
 
- [.line-through]#mysqli_close($con);#
-                    or
- [.line-through]#oci_close($con);#                
+// For MYSQL database
+mysqli_close($con);
+
+// For Oracle database
+oci_close($con);
+
 ----
-The code is not necessary because the connection to the database is automatically closed when the WishDB object is destroyed. However, keep the code that frees the resource. You need to free all resources that use a connection to ensure that a connection is properly closed, even if you call a  ``close``  function or destroy the instance with the database connection.
+
+The code is not necessary because the connection to the database is automatically closed when the WishDB object is destroyed. However, keep the code that frees the resource. You need to free all resources that use a connection to ensure that a connection is properly closed, even if you call a  `close`  function or destroy the instance with the database connection.
 
 
-===  
-
-
+[[refactoringCreateNewWisher]]
 === Refactoring the createNewWisher.php File
 
 Refactoring will not affect the HTML input form or the code for displaying the related error messages.
 
-1. At the top of the <?php?> block, enter the following code to enable the use of the  ``db.php``  file:
+1. At the top of the <?php?> block, enter the following code to enable the use of the  `db.php`  file:
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
-2. Delete the database connection credentials ( ``$dbHost,``  etc). These are now in  ``db.php`` .
-3. Replace the code that connects to the database and gets the ID of the wisher with a call to the  ``get_wisher_id_by_name``  function.
+
+2. Delete the database connection credentials ( `$dbHost,`  etc). These are now in  `db.php` .
+3. Replace the code that connects to the database and gets the ID of the wisher with a call to the  `get_wisher_id_by_name`  function.
 
 For the *MySQL database*, the code you replace is:
 
-[.line-through]#
+[source,php]
+----
+
+// to remove
+
 $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
 
-
 /** Check whether a user whose name matches the "user" field already exists */
 mysqli_select_db($con, "wishlist");
 $user = mysqli_real_escape_string($con, $_POST['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='".$user."'");
 $wisherIDnum=mysqli_num_rows($wisher);
 if ($wisherIDnum) {
-   $userNameIsUnique = false;
-}#
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 
 For the *Oracle database*, the code you replace is:
 
-[.line-through]#
-$con = oci_connect("phpuser", "phpuserpw", "localhost");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
 if (!$con) {
-    $m = oci_error();
-    echo $m['message'], "\n";
-    exit;
+  $m = oci_error();
+  exit('Connect Error ' . $m['message']);
 }
-$query = "select ID from wishers where name = :user_bv";
+$query = "SELECT id FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
 $user = $_POST['user'];
-$wisherID = null;
+
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
 //Each user name should be unique. Check if the submitted user already exists.
-$row = oci_fetch_array($stid, OCI_ASSOC);if ($row) {$wisherID = $row["ID"]; }if ($wisherID != null) {$userNameIsUnique = false;}#
+$row = oci_fetch_array($stid, OCI_ASSOC);
+if ($row) {
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
-The  ``WishDB``  object exists as long as the current page is being processed. It is destroyed after the processing is completed or interrupted. The code for opening a connection to the database is not necessary because this is done by the WishDB function. The code for closing the connection is not necessary because the connection is closed as soon as the  ``WishDB``  object is destroyed.
-4. Replace the code that inserts new wishers into the database with code that calls the  ``create_wisher``  function.
+
+The  `WishDB`  object exists as long as the current page is being processed. It is destroyed after the processing is completed or interrupted. The code for opening a connection to the database is not necessary because this is done by the WishDB function. The code for closing the connection is not necessary because the connection is closed as soon as the  `WishDB`  object is destroyed.
+4. Replace the code that inserts new wishers into the database with code that calls the  `create_wisher`  function.
 
 For the *MySQL database*, the code you replace is:
 
-[.line-through]#if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $password = mysqli_real_escape_string($con, $_POST["password"]);mysqli_select_db($con, "wishlist");mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");mysqli_free_result($wisher);mysqli_close($con);header('Location: editWishList.php');exit;}
-                    #
-
-[source,java]
+[source,php]
 ----
 
-                *if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+// to remove
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+  $password = mysqli_real_escape_string($con, $_POST['password']);
+  mysqli_select_db($con, "wishlist");
+  mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");
+  mysqli_free_result($wisher);
+  mysqli_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
 For the *Oracle database*, the code you replace is:
 
-[.line-through]#
-if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($con, $query);
-    $pwd = $_POST['password'];
-    oci_bind_by_name($stid, ':user_bv', $user);
-    oci_bind_by_name($stid, ':pwd_bv', $pwd);
-    oci_execute($stid);
-    oci_close($con);
-    header('Location: editWishList.php');
-    exit;
-}#
-
-[source,java]
+[source,php]
 ----
 
+// to remove
 
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
 
-*if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($con, $query);
+  $pwd = $_POST['password'];
+  oci_bind_by_name($stid, ':user_bv', $user);
+  oci_bind_by_name($stid, ':pwd_bv', $pwd);
+  oci_execute($stid);
+  oci_free_statement($stid);
+  oci_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
-
+[[lessonResultSourceCode]]
 == Application Source Code after the Current Lesson Is Completed
 
 MySQL users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Flesson4.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
 
 == Next Steps
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ja.asciidoc
index 99dfab6..d28f810 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ja.asciidoc
@@ -41,41 +41,20 @@
 :description: レッスン4: クラスとオブジェクトを持つコードの最適化 - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, レッスン4: クラスとオブジェクトを持つコードの最適化
 
+このレッスンでは、コードを最適化し、将来のコードの保守を容易にします。これは、 `createNewWisher.php` ファイルおよび `wishlist.php` ファイルに影響します。また、 `db.php` というファイルが新しく作成されます。
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. 
-*=> コードの最適化*
-
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
-このレッスンでは、コードを最適化し、将来のコードの保守を容易にします。これは、 ``createNewWisher.php`` ファイルおよび ``wishlist.php`` ファイルに影響します。また、 ``db.php`` というファイルが新しく作成されます。
-
-アプリケーションのコードには、データベースへの問合せを持つ、類似するブロックがいくつか含まれています。コードを将来読みやすく、保守しやすくするために、これらのブロックを抽出して ``WishDB`` と呼ばれる個別クラスの関数として実装し、 ``WishDB`` を ``db.php`` 内に置くことができます。後で ``db.php`` ファイルを任意のPHPファイルに含め、コードの複製を行わずに<<includedFunctions,WishDBから任意の関数>>を使用できます。このような方法によって、問合せまたは関数への変更を1箇所で行うことができ、アプリケーション・コード全体を解析する必要はありません。
+アプリケーションのコードには、データベースへの問合せを持つ、類似するブロックがいくつか含まれています。コードを将来読みやすく、保守しやすくするために、これらのブロックを抽出して `WishDB` と呼ばれる個別クラスの関数として実装し、 `WishDB` を `db.php` 内に置くことができます。後で `db.php` ファイルを任意のPHPファイルに含め、コードの複製を行わずに<<includedFunctions,WishDBから任意の関数>>を使用できます。このような方法によって、問合せまたは関数への変更を1箇所で行うことができ、アプリケーション・コード全体を解析する必要はありません。
 
 WishDBから関数を使用する場合、WishDBの変数の値は変更しません。かわりに、WishDBのオブジェクト作成用の設計図としてWishDBクラスを使用して、そのオブジェクトの変数の値を変更します。そのオブジェクトの操作が終了すると、そのオブジェクトは破棄されます。WishDBクラス自体の値は変わらないので、クラスを何度も再利用できます。場合によっては、クラスのインスタンスが複数同時に存在したり、同時に存在するインスタンスが1つのみ、つまり「単一」クラスにする場合もあります。このチュートリアルのWishDBは単一クラスです。
 
 クラスのオブジェクトの作成を示す用語はクラスの「インスタンス化」で、オブジェクトを別の言葉で言うと、クラスの「インスタンス」です。クラスとオブジェクトを使用するプログラミングを示す一般的な用語は、「オブジェクト指向プログラミング」、またはOOPです。PHP 5では、高度なOOPモデルを使用します。詳細は、link:http://us3.php.net/zend-engine-2.php[+php.net+]を参照してください。
 
-このチュートリアルでは、データベース・コール機能を個々のPHPファイルからWishDBクラスに移動します。また、MySQLのユーザーは、手続き型の ``mysqli`` コールをオブジェクト指向のコールに置き換えます。これは、アプリケーションの新しいオブジェクト指向設計に沿っています。
+このチュートリアルでは、データベース・コール機能を個々のPHPファイルからWishDBクラスに移動します。また、MySQLのユーザーは、手続き型の `mysqli` コールをオブジェクト指向のコールに置き換えます。これは、アプリケーションの新しいオブジェクト指向設計に沿っています。
 
 現在のドキュメントは、PHP向けのNetBeans IDEでのCRUDアプリケーションの作成というPHPチュートリアルの一部です。
 
 
-
+[[previousLessonSourceCode]]
 == 前のレッスンからのアプリケーション・ソース・コード
 
 MySQLユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/files/documents/4/1929/lesson3.zip[+ここ+]をクリックします。
@@ -83,6 +62,7 @@
 Oracleデータベース・ユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson3.zip[+ここ+]をクリックします。
 
 
+[[createDbPhpFile]]
 == db.phpファイルの作成
 
 「ソース・ファイル」フォルダに新しいサブフォルダを作成します。フォルダに「Includes」という名前を付けます。db.phpという名前の新しいファイルを作成し、このファイルを「Includes」に配置します。後で、他のPHPファイルでインクルードされる別のファイルをこのフォルダに追加できます。
@@ -95,48 +75,54 @@
 4. 「ファイル名」フィールドに「db」と入力します。次に、「終了」をクリックします。
 
 
+[[wishDBClass]]
 == WishDBクラスの作成
 
-WishDBクラスを作成するには、クラスの変数を初期化し、クラスのコンストラクタを実装する必要があります。MySQLユーザーは、WishDBクラスが ``mysqli`` を_拡張_することに注意してください。これは、WishDBがPHP mysqliクラスの関数およびその他の特性を_継承_することを意味します。 ``mysqli`` 関数をクラスに追加するときに、この重要性が理解できます。
+WishDBクラスを作成するには、クラスの変数を初期化し、クラスのコンストラクタを実装する必要があります。MySQLユーザーは、WishDBクラスが `mysqli` を_拡張_することに注意してください。これは、WishDBがPHP mysqliクラスの関数およびその他の特性を_継承_することを意味します。 `mysqli` 関数をクラスに追加するときに、この重要性が理解できます。
 
-db.phpファイルを開き、WishDBクラスを作成します。クラス内では、データベースの所有者(ユーザー)の名前とパスワード、データベースの名前、およびデータベース・ホストを格納するためのデータベース構成変数を宣言します。これらの変数の宣言はすべて「private」で、これは、WishDBクラスの外部から宣言の初期値にアクセスできないことを意味します(link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]を参照)。また、WishDBのインスタンスを格納する、private_ static_  ``$instance`` 変数も宣言します。「static」キーワードは、クラスのインスタンスが存在しない場合でも、クラス内の関数は変数にアクセスできることを意味します。
+db.phpファイルを開き、WishDBクラスを作成します。クラス内では、データベースの所有者(ユーザー)の名前とパスワード、データベースの名前、およびデータベース・ホストを格納するためのデータベース構成変数を宣言します。これらの変数の宣言はすべて「private」で、これは、WishDBクラスの外部から宣言の初期値にアクセスできないことを意味します(link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]を参照)。また、WishDBのインスタンスを格納する、private_ static_  `$instance` 変数も宣言します。「static」キーワードは、クラスのインスタンスが存在しない場合でも、クラス内の関数は変数にアクセスできることを意味します。
 
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 class WishDB extends mysqli {
 
-
     // single instance of self shared among all instances
     private static $instance = null;
 
-
     // db connection config vars
     private $user = "phpuser";
     private $pass = "phpuserpw";
     private $dbName = "wishlist";
     private $dbHost = "localhost";
+
 }
+
 ----
 
 *Oracleデータベースの場合:*
 
-
-[source,java]
+[source,php]
 ----
 
-class WishDB {// single instance of self shared among all instances
-private static $instance = null;// db connection config vars
-private $user = "phpuser";
-private $pass = "phpuserpw";
-private $dbName = "wishlist";
-private $dbHost = "localhost/XE";
-private $con = null;}        
-----
+class WishDB {
 
+    // single instance of self shared among all instances
+    private static $instance = null;
+
+    // db connection config vars
+    private $user = "phpuser";
+    private $pass = "phpuserpw";
+    private $dbName = "wishlist";
+    private $dbHost = "localhost/XE";
+    private $con = null;
+
+}
+
+----
 
 [[instantiate-wishdb]]
 == WishDBクラスのインスタンス化
@@ -146,31 +132,37 @@
 WishDBクラスの内部に、次のコードを入力するか、または貼り付けます。
 
 
-[source,java]
+[source,php]
 ----
 
- //This method must be static, and must return an instance of the object if the object
- //does not already exist.
- public static function getInstance() {
-   if (!self::$instance instanceof self) {
-     self::$instance = new self;
-   }
-   return self::$instance;
- }
+// This method must be static, and must return an instance of the object if the object
+// does not already exist.
 
- // The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
- // thus eliminating the possibility of duplicate objects.
- public function __clone() {
-   trigger_error('Clone is not allowed.', E_USER_ERROR);
- }
- public function __wakeup() {
-   trigger_error('Deserializing is not allowed.', E_USER_ERROR);
- }
+public static function getInstance() {
+
+  if (!self::$instance instanceof self) {
+    self::$instance = new self;
+  }
+
+  return self::$instance;
+}
+
+// The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
+// thus eliminating the possibility of duplicate objects.
+ 
+public function __clone() {
+  trigger_error('Clone is not allowed.', E_USER_ERROR);
+}
+
+public function __wakeup() {
+  trigger_error('Deserializing is not allowed.', E_USER_ERROR);
+}
+
 ----
 
- ``getInstance`` 関数は、「public」および「static」です。「public」とは、クラスの外部から自由にアクセスできることを意味します。「static」とは、クラスがインスタンス化されていない場合でも、その関数が使用可能であることを意味します。 ``getInstance`` 関数はクラスをインスタンス化するためにコールされるため、staticである必要があります。この関数は静的な ``$instance`` 変数にアクセスし、その値をクラスのインスタンスとして設定します。
+ `getInstance` 関数は、「public」および「static」です。「public」とは、クラスの外部から自由にアクセスできることを意味します。「static」とは、クラスがインスタンス化されていない場合でも、その関数が使用可能であることを意味します。 `getInstance` 関数はクラスをインスタンス化するためにコールされるため、staticである必要があります。この関数は静的な `$instance` 変数にアクセスし、その値をクラスのインスタンスとして設定します。
 
-ダブルコロン(::)はスコープ解決演算子と呼ばれ、静的関数にアクセスするために ``self`` キーワードが使用されます。 ``self`` は、クラス定義の内部からクラス自身を参照するのに使用されます。ダブルコロンがクラス定義の外部で使用された場合、 ``self`` のかわりにクラスの名前が使用されます。link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+スコープ解決演算子に関するphp.net+]を参照してください。
+ダブルコロン(::)はスコープ解決演算子と呼ばれ、静的関数にアクセスするために `self` キーワードが使用されます。 `self` は、クラス定義の内部からクラス自身を参照するのに使用されます。ダブルコロンがクラス定義の外部で使用された場合、 `self` のかわりにクラスの名前が使用されます。link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+スコープ解決演算子に関するphp.net+]を参照してください。
 
 
 [[wishdb-constructor]]
@@ -182,33 +174,45 @@
 
 *MySQLデータベースの場合:*
 
-
-[source,java]
-----
-
-// private constructorprivate function __construct() {parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);if (mysqli_connect_error()) {exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}parent::set_charset('utf-8');}
-----
-
-*Oracleデータベースの場合:*
-
-
-[source,java]
+[source,php]
 ----
 
 // private constructor
 private function __construct() {
+
+  parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);
+  
+  if (mysqli_connect_error()) {
+    exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
+  }
+
+  parent::set_charset('utf-8');
+}
+
+----
+
+*Oracleデータベースの場合:*
+
+[source,php]
+----
+
+// private constructor
+private function __construct() {
+
     $this->con = oci_connect($this->user, $this->pass, $this->dbHost);
+
     if (!$this->con) {
         $m = oci_error();
         echo $m['message'], "\n";
         exit;
     }
 }
+
 ----
 
-変数 ``$con`` 、 ``$dbHost`` 、 ``$user`` 、または ``$pass`` のかわりに、疑似変数 ``$this`` を使用しています。メソッドがオブジェクトのコンテキスト内からコールされた場合、疑似変数 ``$this`` が使用されます。これはオブジェクト内の変数の値を参照します。
+変数 `$con` 、 `$dbHost` 、 `$user` 、または `$pass` のかわりに、疑似変数 `$this` を使用しています。メソッドがオブジェクトのコンテキスト内からコールされた場合、疑似変数 `$this` が使用されます。これはオブジェクト内の変数の値を参照します。
 
-
+[[includedFunctions]]
 == WishDBクラスの関数
 
 このレッスンでは、WishDBクラスの次の関数を実装します。
@@ -218,6 +222,7 @@
 * wishers表に新しいウィッシャのレコードを追加する<<createWisher,create_wisher>>
 
 
+[[getIDByName]]
 === 関数get_wisher_id_by_name
 
 この関数は、入力パラメータとしてウィッシャの名前が必要で、ウィッシャのIDを返します。
@@ -227,34 +232,56 @@
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wisher_id_by_name($name) {$name = $this->real_escape_string($name);$wisher = $this->query("SELECT id FROM wishers WHERE name = '". $name . "'");
-    if ($wisher->num_rows > 0){$row = $wisher->fetch_row();return $row[0];} elsereturn null;
+public function get_wisher_id_by_name($name) {
+  
+  $name = $this->real_escape_string($name);
+  $wisher = $this->query("SELECT id FROM wishers WHERE name = '" . $name . "'");
+
+  if ($wisher->num_rows > 0){
+    $row = $wisher->fetch_row();
+    return $row[0];
+  } else {
+    return null;
+  }
 }
+
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wisher_id_by_name($name) {
+    
     $query = "SELECT id FROM wishers WHERE name = :user_bv";
     $stid = oci_parse($this->con, $query);
+    
     oci_bind_by_name($stid, ':user_bv', $name);
     oci_execute($stid);
-//Because user is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);if ($row) return $row["ID"];elsereturn null;
+    
+    //Because user is a unique value I only expect one row
+    $row = oci_fetch_array($stid, OCI_ASSOC);
+
+    if ($row) {
+      return $row["ID"];
+    } else {
+      return null;
+    }
 }
+
 ----
-このコード・ブロックは、問合せ ``SELECT ID FROM wishers WHERE name=[ウィッシャの名前の変数]`` を実行します。問合せの結果は、問合せに一致するレコードのIDの配列です。配列が空でない場合は自動的に要素を1つ含むことを意味し、これは、表の作成時にフィールド名がUNIQUEとして指定されたためです。この場合、関数は ``$result`` 配列の最初の要素(番号が0の要素)を返します。配列が空の場合、関数はnullを返します。
 
-*セキュリティ上の注意:* MySQLデータベースの場合、 ``$name`` 文字列は、SQLインジェクション攻撃を避けるためにエスケープされます。link:http://en.wikipedia.org/wiki/SQL_injection[+SQLインジェクションに関するWikipedia+]およびlink:http://us3.php.net/mysql_real_escape_string[+mysql_real_escape_stringのドキュメント+]を参照してください。このチュートリアルのコンテキストでは、有害なSQLインジェクションのリスクはありませんが、そのような攻撃のリスクになるようなMySQL問合せの文字列はエスケープすることをお薦めします。Oracleデータベースでは、バインド変数を使用してこの問題を回避します。
+このコード・ブロックは、問合せ `SELECT ID FROM wishers WHERE name=[ウィッシャの名前の変数]` を実行します。問合せの結果は、問合せに一致するレコードのIDの配列です。配列が空でない場合は自動的に要素を1つ含むことを意味し、これは、表の作成時にフィールド名がUNIQUEとして指定されたためです。この場合、関数は `$result` 配列の最初の要素(番号が0の要素)を返します。配列が空の場合、関数はnullを返します。
+
+*セキュリティ上の注意:* MySQLデータベースの場合、 `$name` 文字列は、SQLインジェクション攻撃を避けるためにエスケープされます。link:http://en.wikipedia.org/wiki/SQL_injection[+SQLインジェクションに関するWikipedia+]およびlink:http://us3.php.net/mysql_real_escape_string[+mysql_real_escape_stringのドキュメント+]を参照してください。このチュートリアルのコンテキストでは、有害なSQLインジェクションのリスクはありませんが、そのような攻撃のリスクになるようなMySQL問合せの文字列はエスケープすることをお薦めします。Oracleデータベースでは、バインド変数を使用してこの問題を回避します。
 
 
+[[getWishesByID]]
 === 関数get_wishes_by_wisher_id
 
 この関数は、入力パラメータとしてウィッシャのIDを必要とし、そのウィッシャに対して登録されているウィッシュを返します。
@@ -264,32 +291,40 @@
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wishes_by_wisher_id($wisherID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);}
+public function get_wishes_by_wisher_id($wisherID) {
+  return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+}
+
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wishes_by_wisher_id($wisherID) {
-    $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ":id_bv", $wisherID);
-    oci_execute($stid);
-    return $stid;
+  
+  $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
+  $stid = oci_parse($this->con, $query);
+  
+  oci_bind_by_name($stid, ":id_bv", $wisherID);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
 
-コード・ブロックは、問合せ ``"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID`` を実行し、問合せに一致するレコードの配列である結果セットを返します。(Oracleデータベースでは、データベースのパフォーマンスとセキュリティ上の理由でバインド変数を使用します。)この選択は、 ``wishes`` 表の外部キーであるwisherIDによって実行されます。
+コード・ブロックは、問合せ `"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID` を実行し、問合せに一致するレコードの配列である結果セットを返します。(Oracleデータベースでは、データベースのパフォーマンスとセキュリティ上の理由でバインド変数を使用します。)この選択は、 `wishes` 表の外部キーであるwisherIDによって実行されます。
 
-*注意:*  ``id`` 値はレッスン7までは不要です。
+*注意:*  `id` 値はレッスン7までは不要です。
 
 
+[[createWisher]]
 === 関数create_wisher
 
 この関数は、wishers表に新しいレコードを作成します。この関数は、入力パラメータとして新しいウィッシャの名前とパスワードを必要とし、何もデータを返しません。
@@ -310,44 +345,58 @@
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function create_wisher($name, $password) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':user_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
+
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($this->con, $query);
+
+  oci_bind_by_name($stid, ':user_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
-このコード・ブロックは、問合せ ``"INSERT wishers (Name, Password) VALUES ([新しいウィッシャの名前とパスワードを表す変数])`` を実行します。問合せによって、 ``$name`` と ``$password`` の値がそれぞれ入力された「name」フィールドと「password」フィールドを持つ「wishers」表に、新しいレコードが追加されます。
+
+このコード・ブロックは、問合せ `"INSERT wishers (Name, Password) VALUES ([新しいウィッシャの名前とパスワードを表す変数])` を実行します。問合せによって、 `$name` と `$password` の値がそれぞれ入力された「name」フィールドと「password」フィールドを持つ「wishers」表に、新しいレコードが追加されます。
 
 
+[[refactoring]]
 == アプリケーション・コードのリファクタリング
 
 データベースを操作するための別のクラスができたので、重複したブロックを、このクラスからの関連する関数へのコールに置き換えることができます。これは、今後のミススペルと不整合を回避するのに役立ちます。機能に影響しないコードの最適化は、リファクタリングと呼ばれます。
 
 
+[[refactoringWishlistFile]]
 === wishlist.phpファイルのリファクタリング
 
 wishlist.phpファイルは短く、具体的に改良できるため、このファイルから開始します。
 
-1. <?php?>ブロックの先頭に次の行を入力して、 ``db.php`` ファイルを使用できるようにします。
+1. <?php?>ブロックの先頭に次の行を入力して、 `db.php` ファイルを使用できるようにします。
 
-[source,java]
+[source,php]
+
 ----
 
 require_once("Includes/db.php");
 ----
-2. データベースに接続してウィッシャのIDを取得するコードを、 ``get_wisher_id_by_name`` 関数のコールに置き換えます。
+2. データベースに接続してウィッシャのIDを取得するコードを、 `get_wisher_id_by_name` 関数のコールに置き換えます。
 
 *MySQLデータベース*の場合に置き換えるコード:
 
-[.line-through]#$con = mysqli_connect("localhost", "phpuser", "phpuserpw");
+[source,php]
+----
+
+// to remove
+
+ $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
@@ -356,82 +405,113 @@
 $user = mysqli_real_escape_string($con, $_GET['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='" . $user . "'");
 if (mysqli_num_rows($wisher) < 1) {
-    exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
+  exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
 }
-$row = mysqli_fetch_row($wisher);$wisherID = $row[0];
-mysqli_free_result($wisher);#
+$row = mysqli_fetch_row($wisher);
+$wisherID = $row[0];
+mysqli_free_result($wisher);
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+// to replace
+
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
+----
 
 *Oracleデータベース*の場合に置き換えるコード:
 
-[.line-through]#$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE");
 if (!$con) {
-   $m = oci_error();
-   echo $m['message'], "\n";
-   exit;
-}
-$query = "SELECT id FROM wishers WHERE name = :user_bv";
+  $m = oci_error();
+  echo $m['message'], "\n";
+  exit;
+}        
+$query = "SELECT ID FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
-$user = $_GET["user"];
+$user = $_GET['user'];
 
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
-//Because user is a unique value I only expect one row$row = oci_fetch_array($stid, OCI_ASSOC);
+//Because user is a unique value I only expect one row
+$row = oci_fetch_array($stid, OCI_ASSOC);
 if (!$row) {
-    echo("The person " . $user . " is not found. Please check the spelling and try again" );exit;}
-$wisherID = $row["ID"]; #
+  echo("The person " . $user . " is not found. Please check the spelling and try again" );
+  exit;
+}
+$wisherID = $row['ID']; 
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
 ----
 
-新しいコードは、最初にWishDBの ``getInstance`` 関数をコールします。 ``getInstance`` 関数はWishDBのインスタンスを返し、コードはそのインスタンス内の ``get_wisher_id_by_name`` 関数をコールします。リクエストされたウィッシャがデータベース内で見つからない場合、コードはプロセスを強制終了し、エラー・メッセージを表示します。
+新しいコードは、最初にWishDBの `getInstance` 関数をコールします。 `getInstance` 関数はWishDBのインスタンスを返し、コードはそのインスタンス内の `get_wisher_id_by_name` 関数をコールします。リクエストされたウィッシャがデータベース内で見つからない場合、コードはプロセスを強制終了し、エラー・メッセージを表示します。
 
 データベースへの接続を開くコードは、ここでは必要ありません。WishDBクラスのコンストラクタによって接続が開かれます。名前またはパスワード(あるいはその両方)を変更した場合は、WishDBクラスの関連する変数のみ更新する必要があります。
 
-3. IDによって識別されるウィッシャのウィッシュを取得するコードを、 ``get_wishes_by_wisher_id`` 関数をコールするコードに置き換えます。
+3. IDによって識別されるウィッシャのウィッシュを取得するコードを、 `get_wishes_by_wisher_id` 関数をコールするコードに置き換えます。
 
 *MySQLデータベース*の場合に置き換えるコード:
 
-[.line-through]#$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=". $wisherID);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+
+// to replace      
+ 
+$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
 
 *Oracleデータベース*の場合に置き換えるコード:
 
-[.line-through]#$query = "select * from wishes where wisher_id = :id_bv";$stid = oci_parse($con, $query);oci_bind_by_name($stid, ":id_bv", $wisherID);oci_execute($stid);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$query = "SELECT description, due_date FROM wishes WHERE wisher_id = :id_bv";
+$stid = oci_parse($con, $query);
+oci_bind_by_name($stid, ":id_bv", $wisherID);
+oci_execute($stid);
+
+// to replace
+
+$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
+
 4. データベース接続を切断する行を除去します。
 
-[source,java]
+[source,php]
 ----
 
- [.line-through]#mysqli_close($con);#
-                    or
- [.line-through]#oci_close($con);#                
+// For MYSQL database
+mysqli_close($con);
+
+// For Oracle database
+oci_close($con);
+
 ----
-WishDBオブジェクトが破棄されるとデータベースへの接続が自動的に切断されるため、このコードは必要ありません。ただし、リソースを解放するコードは保持します。 ``close`` 関数をコールするか、またはデータベース接続を持つインスタンスを破棄した場合でも、接続を使用するすべてのリソースを解放して、接続が正しく切断されるようにする必要があります。
+
+WishDBオブジェクトが破棄されるとデータベースへの接続が自動的に切断されるため、このコードは必要ありません。ただし、リソースを解放するコードは保持します。 `close` 関数をコールするか、またはデータベース接続を持つインスタンスを破棄した場合でも、接続を使用するすべてのリソースを解放して、接続が正しく切断されるようにする必要があります。
 
 
 ===  
@@ -441,121 +521,149 @@
 
 リファクタリングは、HTML入力フォーム、または関連するエラー・メッセージを表示するためのコードには影響がありません。
 
-1. <?php?>ブロックの先頭に次のコードを入力して、 ``db.php`` ファイルを使用できるようにします。
+1. <?php?>ブロックの先頭に次のコードを入力して、 `db.php` ファイルを使用できるようにします。
 
 [source,java]
 ----
 
 require_once("Includes/db.php");
 ----
-2. データベース接続の資格情報( ``$dbHost,`` など)を削除します。これらは現在 ``db.php`` にあります。
-3. データベースに接続してウィッシャのIDを取得するコードを、 ``get_wisher_id_by_name`` 関数のコールに置き換えます。
+2. データベース接続の資格情報( `$dbHost,` など)を削除します。これらは現在 `db.php` にあります。
+3. データベースに接続してウィッシャのIDを取得するコードを、 `get_wisher_id_by_name` 関数のコールに置き換えます。
 
 *MySQLデータベース*の場合に置き換えるコード:
 
-[.line-through]#
+[source,php]
+----
+
+// to remove
+
 $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
 
-
 /** Check whether a user whose name matches the "user" field already exists */
 mysqli_select_db($con, "wishlist");
 $user = mysqli_real_escape_string($con, $_POST['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='".$user."'");
 $wisherIDnum=mysqli_num_rows($wisher);
 if ($wisherIDnum) {
-   $userNameIsUnique = false;
-}#
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 
 *Oracleデータベース*の場合に置き換えるコード:
 
-[.line-through]#
-$con = oci_connect("phpuser", "phpuserpw", "localhost");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
 if (!$con) {
-    $m = oci_error();
-    echo $m['message'], "\n";
-    exit;
+  $m = oci_error();
+  exit('Connect Error ' . $m['message']);
 }
-$query = "select ID from wishers where name = :user_bv";
+$query = "SELECT id FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
 $user = $_POST['user'];
-$wisherID = null;
+
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
 //Each user name should be unique. Check if the submitted user already exists.
-$row = oci_fetch_array($stid, OCI_ASSOC);if ($row) {$wisherID = $row["ID"]; }if ($wisherID != null) {$userNameIsUnique = false;}#
+$row = oci_fetch_array($stid, OCI_ASSOC);
+if ($row) {
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
- ``WishDB`` オブジェクトは、現在のページが処理されている間は存在します。これは、処理が完了したり割込みされた後に破棄されます。WishDB関数によってデータベースへの接続が開くため、データベースへの接続を開くコードは必要ありません。 ``WishDB`` オブジェクトが破棄されると同時に接続が切断されるため、接続を切断するためのコードは必要ありません。
-4. 新しいウィッシャをデータベースに挿入するコードを、 ``create_wisher`` 関数をコールするコードに置き換えます。
+
+ `WishDB` オブジェクトは、現在のページが処理されている間は存在します。これは、処理が完了したり割込みされた後に破棄されます。WishDB関数によってデータベースへの接続が開くため、データベースへの接続を開くコードは必要ありません。 `WishDB` オブジェクトが破棄されると同時に接続が切断されるため、接続を切断するためのコードは必要ありません。
+4. 新しいウィッシャをデータベースに挿入するコードを、 `create_wisher` 関数をコールするコードに置き換えます。
 
 *MySQLデータベース*の場合に置き換えるコード:
 
-[.line-through]#if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $password = mysqli_real_escape_string($con, $_POST["password"]);mysqli_select_db($con, "wishlist");mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");mysqli_free_result($wisher);mysqli_close($con);header('Location: editWishList.php');exit;}
-                    #
-
-[source,java]
+[source,php]
 ----
 
-                *if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+// to remove
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+  $password = mysqli_real_escape_string($con, $_POST['password']);
+  mysqli_select_db($con, "wishlist");
+  mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");
+  mysqli_free_result($wisher);
+  mysqli_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
 *Oracleデータベース*の場合に置き換えるコード:
 
-[.line-through]#
-if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($con, $query);
-    $pwd = $_POST['password'];
-    oci_bind_by_name($stid, ':user_bv', $user);
-    oci_bind_by_name($stid, ':pwd_bv', $pwd);
-    oci_execute($stid);
-    oci_close($con);
-    header('Location: editWishList.php');
-    exit;
-}#
-
-[source,java]
+[source,php]
 ----
 
+// to remove
 
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
 
-*if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($con, $query);
+  $pwd = $_POST['password'];
+  oci_bind_by_name($stid, ':user_bv', $user);
+  oci_bind_by_name($stid, ':pwd_bv', $pwd);
+  oci_execute($stid);
+  oci_free_statement($stid);
+  oci_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
-
 == 現在のレッスン完了後のアプリケーション・ソース・コード
 
 MySQLユーザー: このレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Flesson4.zip[+ここ+]をクリックします。
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_pt_BR.asciidoc
index 35bb139..8010c5d 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_pt_BR.asciidoc
@@ -41,48 +41,26 @@
 :description: Lição 4: Otimizando o Código com Classes e Objetos - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lição 4: Otimizando o Código com Classes e Objetos
 
+Nesta lição, você otimizará o código para facilitar sua manutenção no futuro. Isso afeta os arquivos  `createNewWisher.php`  e  `wishlist.php` . Além disso, um novo arquivo chamado  `db.php`  é criado.
 
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário da Aplicação+]
-5. 
-*=> Otimizando o Código*
-
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
-Nesta lição, você otimizará o código para facilitar sua manutenção no futuro. Isso afeta os arquivos  ``createNewWisher.php``  e  ``wishlist.php`` . Além disso, um novo arquivo chamado  ``db.php``  é criado.
-
-O código do sua aplicação contém vários blocos de código semelhantes com consultas ao banco de dados. Para facilitar a leitura e a manutenção do código no futuro, você pode extrair esses blocos, implementá-los como funções de uma classe separada chamada  ``WishDB``  e colocar  ``WishDB``  em  ``db.php`` . Depois disso, você pode incluir o arquivo  ``db.php``  em qualquer arquivo PHP e usar qualquer <<includedFunctions,função de WishDB>> sem duplicação de código. Essa abordagem garante que quaisquer alterações em consultas ou funções serão feitas em um único local e você não terá de fazer parsing do código inteiro da aplicação.
+O código do sua aplicação contém vários blocos de código semelhantes com consultas ao banco de dados. Para facilitar a leitura e a manutenção do código no futuro, você pode extrair esses blocos, implementá-los como funções de uma classe separada chamada  `WishDB`  e colocar  `WishDB`  em  `db.php` . Depois disso, você pode incluir o arquivo  `db.php`  em qualquer arquivo PHP e usar qualquer <<includedFunctions,função de WishDB>> sem duplicação de código. Essa abordagem garante que quaisquer alterações em consultas ou funções serão feitas em um único local e você não terá de fazer parsing do código inteiro da aplicação.
 
 Ao usar uma função de WishDB, você não altera o valor de quaisquer variáveis de WishDB. Em vez disso, use a classe WishDB como um plano gráfico para criar um objeto de WishDB, e altere os valores das variáveis nesse objeto. Quando você finaliza o trabalho com esse objeto, ele é destruído. Como os valores da classe WishDB nunca são alterados, você pode reutilizar a classe por um número ilimitado de vezes. Em alguns casos, talvez você queira ter várias instâncias de uma classe ao mesmo tempo, e em outros casos, talvez você prefira uma classe "única", onde você possui apenas uma instância de cada vez. O WishDB neste tutorial é uma classe única.
 
 Observe que o termo para criar um objeto de uma classe é "instanciar" essa classe, e que outra palavra para um objeto é uma "instância" de uma classe. O termo geral para programar com classes e objetos é "programação orientada por objeto" ou OOP. O PHP 5 usa um modelo OOP sofisticado. Consulte link:http://us3.php.net/zend-engine-2.php[+php.net+] para obter mais informações.
 
-Neste tutorial, a funcionalidade de chamada do banco de dados é movida de arquivos PHP individuais para classes WishDB. Usuários do MySQL também podem substituir a chamada  ``mysqli``  de estilo de procedimento por chamadas orientadas por objetos. Isso é para manter com o novo projeto orientado por objetos da aplicação
+Neste tutorial, a funcionalidade de chamada do banco de dados é movida de arquivos PHP individuais para classes WishDB. Usuários do MySQL também podem substituir a chamada  `mysqli`  de estilo de procedimento por chamadas orientadas por objetos. Isso é para manter com o novo projeto orientado por objetos da aplicação
 
 O documento atual é uma parte do tutorial Criando uma Aplicação CRUD no NetBeans IDE para PHP.
 
-
-
+[[previousLessonSourceCode]]
 == Código-fonte da Aplicação da Lição Anterior
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1929/lesson3.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior estiver concluída.
 
 Usuários do Banco de Dados Oracle: clique link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson3.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior estiver concluída.
 
-
+[[createDbPhpFile]]
 == Criando o Arquivo db.php
 
 Crie uma nova subpasta na pasta Códigos-fonte. Nomeie a pasta Inclusão. Crie uma nova pasta nomeada db.php e coloque em Inclusão. Depois disso, é possível adicionar mais arquivos para essa pasta que será incluída em outros arquivos PHP.
@@ -94,49 +72,55 @@
 3. Clique com o botão direito do mouse no nó Inclusão e selecione Novo > Arquivo PHP no menu de contexto. A caixa de diálogo Novo Arquivo PHP é aberta.
 4. No campo Nome do Arquivo, digite db. Em seguida, clique em Finalizar.
 
-
+[[wishDBClass]]
 == Criando a Classe WishDB
 
-Para criar a classe WishDB, você precisa inicializar as variáveis da classe e implementar um construtor da classe. Usuários MySQL, observem a classe WishDB _extends_  ``mysqli`` . Isso significa que o WishDB _herda_ a função e outras características da classe mysqli PHP. A importância disso é mostrada ao adicionar as funções  ``mysqli``  à classe.
+Para criar a classe WishDB, você precisa inicializar as variáveis da classe e implementar um construtor da classe. Usuários MySQL, observem a classe WishDB _extends_  `mysqli` . Isso significa que o WishDB _herda_ a função e outras características da classe mysqli PHP. A importância disso é mostrada ao adicionar as funções  `mysqli`  à classe.
 
-Abra o arquivo db.php e crie a classe WishDB. Na classe, declare variáveis de configuração de banco de dados para armazenar o nome e a senha do proprietário do banco de dados (usuário), o nome e o host do banco de dados. Todas essas declarações de variável são "privadas", o que significa que os valores iniciais nas declarações não podem ser acessados de fora da classe WishDB (Consulte link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]). Declare também a variável _ static_  ``$instance``  privada, que armazena a instância do WishDB. A palavra-chave “estática” significa que a função na classe pode acessar a variável mesmo quando não há instância da classe.
+Abra o arquivo db.php e crie a classe WishDB. Na classe, declare variáveis de configuração de banco de dados para armazenar o nome e a senha do proprietário do banco de dados (usuário), o nome e o host do banco de dados. Todas essas declarações de variável são "privadas", o que significa que os valores iniciais nas declarações não podem ser acessados de fora da classe WishDB (Consulte link:http://us3.php.net/manual/en/language.oop5.visibility.php[+php.net+]). Declare também a variável _ static_  `$instance`  privada, que armazena a instância do WishDB. A palavra-chave “estática” significa que a função na classe pode acessar a variável mesmo quando não há instância da classe.
 
 *Para o Banco de Dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
 class WishDB extends mysqli {
 
-
     // single instance of self shared among all instances
     private static $instance = null;
 
-
     // db connection config vars
     private $user = "phpuser";
     private $pass = "phpuserpw";
     private $dbName = "wishlist";
     private $dbHost = "localhost";
+
 }
+
 ----
 
-*Para o Banco de Dados Oracle: *
+*Para o Banco de Dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
-class WishDB {// single instance of self shared among all instances
-private static $instance = null;// db connection config vars
-private $user = "phpuser";
-private $pass = "phpuserpw";
-private $dbName = "wishlist";
-private $dbHost = "localhost/XE";
-private $con = null;}        
-----
+class WishDB {
 
+    // single instance of self shared among all instances
+    private static $instance = null;
+
+    // db connection config vars
+    private $user = "phpuser";
+    private $pass = "phpuserpw";
+    private $dbName = "wishlist";
+    private $dbHost = "localhost/XE";
+    private $con = null;
+
+}
+
+----
 
 [[instantiate-wishdb]]
 == Instanciando a classe WishDB
@@ -146,31 +130,37 @@
 Dentro da classe WishDB, digite ou cole o seguinte código:
 
 
-[source,java]
+[source,php]
 ----
 
- //This method must be static, and must return an instance of the object if the object
- //does not already exist.
- public static function getInstance() {
-   if (!self::$instance instanceof self) {
-     self::$instance = new self;
-   }
-   return self::$instance;
- }
+// This method must be static, and must return an instance of the object if the object
+// does not already exist.
 
- // The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
- // thus eliminating the possibility of duplicate objects.
- public function __clone() {
-   trigger_error('Clone is not allowed.', E_USER_ERROR);
- }
- public function __wakeup() {
-   trigger_error('Deserializing is not allowed.', E_USER_ERROR);
- }
+public static function getInstance() {
+
+  if (!self::$instance instanceof self) {
+    self::$instance = new self;
+  }
+
+  return self::$instance;
+}
+
+// The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
+// thus eliminating the possibility of duplicate objects.
+ 
+public function __clone() {
+  trigger_error('Clone is not allowed.', E_USER_ERROR);
+}
+
+public function __wakeup() {
+  trigger_error('Deserializing is not allowed.', E_USER_ERROR);
+}
+
 ----
 
-A função  ``getInstance``  é "pública" e "estática." "Pública" significa que ela pode ser acessada publicamente de fora da classe. "Estática" significa que a função está disponível mesmo quando a classe não tiver sido instanciada. Como a função  ``getInstance``  é chamada para instanciar a classe, ela deve ser estática. Observe que essa função acessa a variável ``$instance``  estática e ajusta os valores como a instância da classe.
+A função  `getInstance`  é "pública" e "estática." "Pública" significa que ela pode ser acessada publicamente de fora da classe. "Estática" significa que a função está disponível mesmo quando a classe não tiver sido instanciada. Como a função  `getInstance`  é chamada para instanciar a classe, ela deve ser estática. Observe que essa função acessa a variável `$instance`  estática e ajusta os valores como a instância da classe.
 
-Os dois-pontos duplos (::), chamados de Operador de Resolução de Escopo, e a palavra-chave  ``self``  são usados para acessar funções estáticas.  ``Self``  é usado na definição da classe para se referir à classe em si. Quando os dois-pontos duplos forem usados fora da definição da classe, o nome da classe será usado em vez de  ``self`` . Consulte link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+php.net no Operador de Resolução de Escopo+].
+Os dois-pontos duplos (::), chamados de Operador de Resolução de Escopo, e a palavra-chave  `self`  são usados para acessar funções estáticas.  `Self`  é usado na definição da classe para se referir à classe em si. Quando os dois-pontos duplos forem usados fora da definição da classe, o nome da classe será usado em vez de  `self` . Consulte link:http://us3.php.net/manual/en/language.oop5.paamayim-nekudotayim.php[+php.net no Operador de Resolução de Escopo+].
 
 
 [[wishdb-constructor]]
@@ -183,32 +173,45 @@
 *Para o banco de dados MySQL:*
 
 
-[source,java]
-----
-
-// private constructorprivate function __construct() {parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);if (mysqli_connect_error()) {exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}parent::set_charset('utf-8');}
-----
-
-*Para o banco de dados Oracle:*
-
-
-[source,java]
+[source,php]
 ----
 
 // private constructor
 private function __construct() {
+
+  parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);
+  
+  if (mysqli_connect_error()) {
+    exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
+  }
+
+  parent::set_charset('utf-8');
+}
+
+----
+
+*Para o banco de dados Oracle:*
+
+[source,php]
+----
+
+// private constructor
+private function __construct() {
+
     $this->con = oci_connect($this->user, $this->pass, $this->dbHost);
+
     if (!$this->con) {
         $m = oci_error();
         echo $m['message'], "\n";
         exit;
     }
 }
+
 ----
 
-Observe o uso da pseudovariável  ``$this``  em vez das variáveis  ``$con`` ,  ``$dbHost`` ,  ``$user``  ou  ``$pass`` . A pseudovariável  ``$this``  é usada quando um método é chamado de dentro do contexto de um objeto. Ela se refere ao valor de uma variável nesse objeto.
+Observe o uso da pseudovariável  `$this`  em vez das variáveis  `$con` ,  `$dbHost` ,  `$user`  ou  `$pass` . A pseudovariável  `$this`  é usada quando um método é chamado de dentro do contexto de um objeto. Ela se refere ao valor de uma variável nesse objeto.
 
-
+[[includedFunctions]]
 == Funções da Classe WishDB
 
 Nesta lição, você implementará as seguintes funções da classe WishDB:
@@ -218,6 +221,7 @@
 * <<createWisher,create_wisher>> para adicionar um novo registro de wisher aos wishers da tabela
 
 
+[[getIDByName]]
 === Função get_wisher_id_by_name
 
 A função requer o nome de um wisher como parâmetro de entrada e retorna o wisher id. 
@@ -227,34 +231,55 @@
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wisher_id_by_name($name) {$name = $this->real_escape_string($name);$wisher = $this->query("SELECT id FROM wishers WHERE name = '". $name . "'");
-    if ($wisher->num_rows > 0){$row = $wisher->fetch_row();return $row[0];} elsereturn null;
+public function get_wisher_id_by_name($name) {
+  
+  $name = $this->real_escape_string($name);
+  $wisher = $this->query("SELECT id FROM wishers WHERE name = '" . $name . "'");
+
+  if ($wisher->num_rows > 0){
+    $row = $wisher->fetch_row();
+    return $row[0];
+  } else {
+    return null;
+  }
 }
+
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wisher_id_by_name($name) {
+    
     $query = "SELECT id FROM wishers WHERE name = :user_bv";
     $stid = oci_parse($this->con, $query);
+    
     oci_bind_by_name($stid, ':user_bv', $name);
     oci_execute($stid);
-//Because user is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);if ($row) return $row["ID"];elsereturn null;
+    
+    //Because user is a unique value I only expect one row
+    $row = oci_fetch_array($stid, OCI_ASSOC);
+
+    if ($row) {
+      return $row["ID"];
+    } else {
+      return null;
+    }
 }
+
 ----
-O bloco de código executa a consulta  ``SELECT ID FROM wishers WHERE name = [variável para o nome do wisher]`` . O resultado da consulta é um array de IDs dos registros que satisfazem a consulta. Se o array não estiver vazio, isso significa automaticamente que ele contém um elemento, porque o nome do campo é especificado como UNIQUE durante a criação da tabela. Nesse caso, a função retorna o primeiro elemento do array  ``$result``  (o elemento com zero). Se o array estiver vazio, a função retornará nula.
 
-*Observação sobre Segurança:* Para o banco de dados MySQL, a string  ``$name``  tem escape para evitar os ataques de injeção SQL. Consulte link:http://en.wikipedia.org/wiki/SQL_injection[+Wikipedia sobre injeções SQL+] e a documentação mysql_real_escape_string. Embora no contexto deste tutorial você não esteja correndo o risco de injeções SQL prejudiciais, recomendamos escapar as strings nas consultas MySQL que estariam correndo risco de tal ataque. O banco de dados Oracle evita esse problema usando variáveis de ligação.
+O bloco de código executa a consulta  `SELECT ID FROM wishers WHERE name = [variável para o nome do wisher]` . O resultado da consulta é um array de IDs dos registros que satisfazem a consulta. Se o array não estiver vazio, isso significa automaticamente que ele contém um elemento, porque o nome do campo é especificado como UNIQUE durante a criação da tabela. Nesse caso, a função retorna o primeiro elemento do array  `$result`  (o elemento com zero). Se o array estiver vazio, a função retornará nula.
 
+*Observação sobre Segurança:* Para o banco de dados MySQL, a string  `$name`  tem escape para evitar os ataques de injeção SQL. Consulte link:http://en.wikipedia.org/wiki/SQL_injection[+Wikipedia sobre injeções SQL+] e a documentação mysql_real_escape_string. Embora no contexto deste tutorial você não esteja correndo o risco de injeções SQL prejudiciais, recomendamos escapar as strings nas consultas MySQL que estariam correndo risco de tal ataque. O banco de dados Oracle evita esse problema usando variáveis de ligação.
 
+[[getWishesByID]]
 === Função get_wishes_by_wisher_id
 
 A função exige o id de um wisher como o parâmetro de entrada e retorna os desejos registrados para o wisher.
@@ -264,32 +289,39 @@
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wishes_by_wisher_id($wisherID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);}
+public function get_wishes_by_wisher_id($wisherID) {
+  return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+}
+
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wishes_by_wisher_id($wisherID) {
-    $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ":id_bv", $wisherID);
-    oci_execute($stid);
-    return $stid;
+  
+  $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
+  $stid = oci_parse($this->con, $query);
+  
+  oci_bind_by_name($stid, ":id_bv", $wisherID);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
 
-O bloco de código executa a consulta  ``"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID``  e retorna um conjunto de resultados que é um array de registros que atende à consulta. (O banco de dados Oracle usa variáveis de ligação para o desempenho do banco de dados e motivos de segurança). A seleção é realizada pelo wisherID, que é a chave estrangeira dos  ``desejos``  da tabela.
+O bloco de código executa a consulta  `"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID`  e retorna um conjunto de resultados que é um array de registros que atende à consulta. (O banco de dados Oracle usa variáveis de ligação para o desempenho do banco de dados e motivos de segurança). A seleção é realizada pelo wisherID, que é a chave estrangeira dos  `desejos`  da tabela.
 
-*Observação:* o valor ``id``  não é necessário até a Lição 7.
+*Observação:* o valor `id`  não é necessário até a Lição 7.
 
-
+[[createWisher]]
 === Função create_wisher
 
 A função cria um novo registro na tabela de wishers. A função requer o nome e a senha de um novo wisher como os parâmetros de entrada e não retorna dados.
@@ -299,55 +331,75 @@
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function create_wisher ($name, $password){
-    $name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
+public function create_wisher ($name, $password) {
+
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+
+  return $this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
 }
+
 ----
 
+
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function create_wisher($name, $password) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':user_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
+
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($this->con, $query);
+
+  oci_bind_by_name($stid, ':user_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
-O bloco de código executa a consulta  ``"INSERT wishers (Name, Password) VALUES ([variáveis representando o nome e a senha do novo wisher]).``  A consulta adiciona um novo registro à tabela "wishers" com os campos "nome" e "senha" preenchidos com os valores de  ``$name``  e  ``$password``  respectivamente.
+
+O bloco de código executa a consulta  `"INSERT wishers (Name, Password) VALUES ([variáveis representando o nome e a senha do novo wisher]).`  A consulta adiciona um novo registro à tabela "wishers" com os campos "nome" e "senha" preenchidos com os valores de  `$name`  e  `$password`  respectivamente.
 
 
+[[refactoring]]
 == Refatorando o Código da Sua Aplicação
 
 Agora que tem uma classe separada para trabalhar com o banco de dados, você pode substituir blocos duplicados por chamadas para as funções relevantes desta classe. Isso ajudará a evitar erros ortográficos e inconsistência no futuro. A otimização de código que não afeta a funcionalidade é chamada de refatoração.
 
 
+[[refactoringWishlistFile]]
 === Refatorando o Arquivo wishlist.php
 
 Comece com o arquivo wishlist.php porque ele é pequeno e as melhorias serão mais ilustrativas.
 
-1. Na parte superior do bloco <?php ?> , insira a linha seguinte para permitir o uso do arquivo  ``db.php`` :
+1. Na parte superior do bloco <?php ?> , insira a linha seguinte para permitir o uso do arquivo  `db.php` :
 
 [source,java]
 ----
 
 require_once("Includes/db.php");
+
 ----
-2. Substitua o código que estabelece conexão com o banco de dados e que obtém o wisher ID por uma chamada para a função  ``get_wisher_id_by_name`` .
+2. Substitua o código que estabelece conexão com o banco de dados e que obtém o wisher ID por uma chamada para a função  `get_wisher_id_by_name` .
 
 Para o *banco de dados MySQL*, o código a ser substituído é:
 
-[.line-through]#$con = mysqli_connect("localhost", "phpuser", "phpuserpw");
+[source,php]
+----
+
+// to remove
+
+ $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
@@ -356,206 +408,264 @@
 $user = mysqli_real_escape_string($con, $_GET['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='" . $user . "'");
 if (mysqli_num_rows($wisher) < 1) {
-    exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
+  exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
 }
-$row = mysqli_fetch_row($wisher);$wisherID = $row[0];
-mysqli_free_result($wisher);#
+$row = mysqli_fetch_row($wisher);
+$wisherID = $row[0];
+mysqli_free_result($wisher);
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+// to replace
+
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
+----
 
 Para o *banco de dados Oracle*, o código a ser substituído é:
 
-[.line-through]#$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE");
 if (!$con) {
-   $m = oci_error();
-   echo $m['message'], "\n";
-   exit;
-}
-$query = "SELECT id FROM wishers WHERE name = :user_bv";
+  $m = oci_error();
+  echo $m['message'], "\n";
+  exit;
+}        
+$query = "SELECT ID FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
-$user = $_GET["user"];
+$user = $_GET['user'];
 
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
-//Because user is a unique value I only expect one row$row = oci_fetch_array($stid, OCI_ASSOC);
+//Because user is a unique value I only expect one row
+$row = oci_fetch_array($stid, OCI_ASSOC);
 if (!$row) {
-    echo("The person " . $user . " is not found. Please check the spelling and try again" );exit;}
-$wisherID = $row["ID"]; #
+  echo("The person " . $user . " is not found. Please check the spelling and try again" );
+  exit;
+}
+$wisherID = $row['ID']; 
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
 ----
 
-O novo código chama primeiro a função  ``getInstance``  no WishDB. O  ``getInstance``  retorna uma instância de WishDB, e o código chama a função  ``get_wisher_id_by_name``  dentro dessa instância. Se a lista de desejos solicitada não for encontrada no banco de dados, o código terminará o processo, e exibirá uma mensagem de erro.
+O novo código chama primeiro a função  `getInstance`  no WishDB. O  `getInstance`  retorna uma instância de WishDB, e o código chama a função  `get_wisher_id_by_name`  dentro dessa instância. Se a lista de desejos solicitada não for encontrada no banco de dados, o código terminará o processo, e exibirá uma mensagem de erro.
 
 Nenhum código é necessário para abrir uma conexão ao banco de dados. A conexão é aberta pelo construtor da classe WishDB. Se o nome e/ou a senha for alterado, você precisará atualizar somente as variáveis relevantes da classe WishDB.
 
-3. Substitua o código que recebe desejos de um wisher identificado pelo ID com um código que chama a função  ``get_wishes_by_wisher_id`` .
+3. Substitua o código que recebe desejos de um wisher identificado pelo ID com um código que chama a função  `get_wishes_by_wisher_id` .
 
 Para o *banco de dados MySQL*, o código a ser substituído é:
 
-[.line-through]#$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=". $wisherID);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+
+// to replace      
+ 
+$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
 
 Para o *banco de dados Oracle*, o código a ser substituído é:
 
-[.line-through]#$query = "select * from wishes where wisher_id = :id_bv";$stid = oci_parse($con, $query);oci_bind_by_name($stid, ":id_bv", $wisherID);oci_execute($stid);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$query = "SELECT description, due_date FROM wishes WHERE wisher_id = :id_bv";
+$stid = oci_parse($con, $query);
+oci_bind_by_name($stid, ":id_bv", $wisherID);
+oci_execute($stid);
+
+// to replace
+
+$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
+
 4. Remova a linha que fecha a conexão do banco de dados.
 
-[source,java]
+[source,php]
 ----
 
- [.line-through]#mysqli_close($con);#
-                    or
- [.line-through]#oci_close($con);#                
+// For MYSQL database
+mysqli_close($con);
+
+// For Oracle database
+oci_close($con);
+
 ----
-O código não é necessário porque a conexão ao banco de dados é automaticamente fechada quando o objeto WishDB é destruído. No entanto, mantenha o código que libera o recurso. É necessário liberar todos os recursos que usam uma conexão para garantir que a conexão seja fechada corretamente, mesmo quando a função  ``close``  é chamada ou se a instância for destruída com a conexão do banco de dados.
 
+O código não é necessário porque a conexão ao banco de dados é automaticamente fechada quando o objeto WishDB é destruído. No entanto, mantenha o código que libera o recurso. É necessário liberar todos os recursos que usam uma conexão para garantir que a conexão seja fechada corretamente, mesmo quando a função  `close`  é chamada ou se a instância for destruída com a conexão do banco de dados.
 
-===  
-
-
+[[refactoringCreateNewWisher]]
 === Refatorando o Arquivo createNewWisher.php
 
 A refatoração não afetará o form de entrada HTML ou o código para exibir as mensagens de erro relacionadas.
 
-1. Na parte superior do bloco <?php ?>, insira o código seguinte para permitir o uso do arquivo  ``db.php`` :
+1. Na parte superior do bloco <?php ?>, insira o código seguinte para permitir o uso do arquivo  `db.php` :
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
-2. Delete a credencial da conexão do banco de dados ( ``$dbHost,``  etc). Esses estão agora em  ``db.php.`` .
-3. Substitua o código que estabelece conexão com o banco de dados e que obtém o wisher ID por uma chamada para a função  ``get_wisher_id_by_name`` .
+
+2. Delete a credencial da conexão do banco de dados ( `$dbHost,`  etc). Esses estão agora em  `db.php.` .
+3. Substitua o código que estabelece conexão com o banco de dados e que obtém o wisher ID por uma chamada para a função  `get_wisher_id_by_name` .
 
 Para o *banco de dados MySQL*, o código a ser substituído é:
 
-[.line-through]#
+[source,php]
+----
+
+// to remove
+
 $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
 
-
 /** Check whether a user whose name matches the "user" field already exists */
 mysqli_select_db($con, "wishlist");
 $user = mysqli_real_escape_string($con, $_POST['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='".$user."'");
 $wisherIDnum=mysqli_num_rows($wisher);
 if ($wisherIDnum) {
-   $userNameIsUnique = false;
-}#
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 
 Para o *banco de dados Oracle*, o código a ser substituído é:
 
-[.line-through]#
-$con = oci_connect("phpuser", "phpuserpw", "localhost");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
 if (!$con) {
-    $m = oci_error();
-    echo $m['message'], "\n";
-    exit;
+  $m = oci_error();
+  exit('Connect Error ' . $m['message']);
 }
-$query = "select ID from wishers where name = :user_bv";
+$query = "SELECT id FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
 $user = $_POST['user'];
-$wisherID = null;
+
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
 //Each user name should be unique. Check if the submitted user already exists.
-$row = oci_fetch_array($stid, OCI_ASSOC);if ($row) {$wisherID = $row["ID"]; }if ($wisherID != null) {$userNameIsUnique = false;}#
+$row = oci_fetch_array($stid, OCI_ASSOC);
+if ($row) {
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
-O objeto  ``WishDB``  existe enquanto a página atual estiver sendo processada. Ele é destruído depois que o processamento é concluído ou interrompido. O código para abrir uma conexão ao banco de dados não é necessário porque isso é feito pela função WishDB. O código para fechar a conexão não é necessário porque a conexão é fechada assim que o objeto  ``WishDB``  é destruído.
-4. Substitua o código que insere novos desejos no banco de dados pelo código que chama a função  ``create_wisher`` .
+
+O objeto  `WishDB`  existe enquanto a página atual estiver sendo processada. Ele é destruído depois que o processamento é concluído ou interrompido. O código para abrir uma conexão ao banco de dados não é necessário porque isso é feito pela função WishDB. O código para fechar a conexão não é necessário porque a conexão é fechada assim que o objeto  `WishDB`  é destruído.
+4. Substitua o código que insere novos desejos no banco de dados pelo código que chama a função  `create_wisher` .
 
 Para o *banco de dados MySQL*, o código a ser substituído é:
 
-[.line-through]#if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $password = mysqli_real_escape_string($con, $_POST["password"]);mysqli_select_db($con, "wishlist");mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");mysqli_free_result($wisher);mysqli_close($con);header('Location: editWishList.php');exit;}
-                    #
-
-[source,java]
+[source,php]
 ----
 
-                *if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+// to remove
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+  $password = mysqli_real_escape_string($con, $_POST['password']);
+  mysqli_select_db($con, "wishlist");
+  mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");
+  mysqli_free_result($wisher);
+  mysqli_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
 Para o *banco de dados Oracle*, o código a ser substituído é:
 
-[.line-through]#
-if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($con, $query);
-    $pwd = $_POST['password'];
-    oci_bind_by_name($stid, ':user_bv', $user);
-    oci_bind_by_name($stid, ':pwd_bv', $pwd);
-    oci_execute($stid);
-    oci_close($con);
-    header('Location: editWishList.php');
-    exit;
-}#
-
-[source,java]
+[source,php]
 ----
 
+// to remove
 
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
 
-*if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($con, $query);
+  $pwd = $_POST['password'];
+  oci_bind_by_name($stid, ':user_bv', $user);
+  oci_bind_by_name($stid, ':pwd_bv', $pwd);
+  oci_execute($stid);
+  oci_free_statement($stid);
+  oci_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
-
 == O código-fonte da Aplicação após a Lição Atual está Concluído
 
 Usuários do MySQL: clique link:https://netbeans.org/projects/www/downloads/download/php%252Flesson4.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição estiver concluída.
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ru.asciidoc
index 5958d89..6803cf3 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_ru.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, Урок 4: Оптимизация кода путем добавления классов и объектов
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. 
-*=> Оптимизация кода*
-
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. link:wish-list-lesson6.html[+Добавление к базе данных новых желаний+]
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В этом уроке рассматриваются способы оптимизации кода, позволяющие упростить поддержку этого кода в дальнейшем. Данная процедура затрагивает файлы  ``createNewWisher.php``  и  ``wishlist.php`` . Кроме того, создается новый файл под названием  ``db.php`` .
 
 Код приложения содержит несколько похожих блоков с запросами к базе данных. Для упрощения чтения и поддержки кода в будущем можно извлечь эти блоки, реализовать их в качестве функций отдельного класса  ``WishDB``  и поместить текст  ``WishDB``  в файл  ``db.php`` . Впоследствии можно включить файл  ``db.php``  в любой файл PHP и использовать любую <<includedFunctions,функцию класса WishDB>> без дублирования кода. Такой подход гарантирует, что любые изменения в запросах или функциях будут выполнены в одном местоположении, и анализировать весь код приложения не потребуется.
@@ -75,14 +55,14 @@
 Текущий документ является частью краткого учебного курса "Создание приложения CRUD в IDE NetBeans для PHP".
 
 
-
+[[previousLessonSourceCode]]
 == Исходный код приложения из предыдущего урока
 
 Для пользователей MySQL: перейдите по link:https://netbeans.org/files/documents/4/1929/lesson3.zip[+этой ссылке+] для загрузки исходного кода, описывающего состояние проекта на момент завершения предыдущего урока.
 
 Для пользователей Oracle Database: щелкните link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson3.zip[+здесь+] для загрузки исходного кода, отражающего состояние проекта по завершении предыдущего урока.
 
-
+[[createDbPhpFile]]
 == Создание файла db.php
 
 Создайте новую подпапку в папке "Исходные файлы". Дайте папке имя Includes. Создайте новый файл под именем db.php и поместите его в папку Includes. Позже вы сможете добавлять в эту папку файлы, которые будут включаться в другие РНР-файлы.
@@ -95,6 +75,7 @@
 4. В поле "Имя файла" введите db. Затем нажмите кнопку "Готово".
 
 
+[[wishDBClass]]
 == Создание класса WishDB
 
 Для создания класса WishDB необходимо инициализировать переменные класса и реализовать конструктор класса. Пользователи MySQL, обратите внимание, что класс WishDB _расширяет_  ``mysqli`` . Это означает, что WishDB _наследует_ функции и другие характеристики класса PHP mysqli. Вы убедитесь в важности этого при добавлении функций  ``mysqli ``  к классу.
@@ -103,40 +84,44 @@
 
 *Для базы данных MySQL:*
 
-
-[source,java]
+[[source,php]
 ----
 
 class WishDB extends mysqli {
 
-
     // single instance of self shared among all instances
     private static $instance = null;
 
-
     // db connection config vars
     private $user = "phpuser";
     private $pass = "phpuserpw";
     private $dbName = "wishlist";
     private $dbHost = "localhost";
+
 }
+
 ----
 
 *Для базы данных Oracle:*
 
-
-[source,java]
+[source,php]
 ----
 
-class WishDB {// single instance of self shared among all instances
-private static $instance = null;// db connection config vars
-private $user = "phpuser";
-private $pass = "phpuserpw";
-private $dbName = "wishlist";
-private $dbHost = "localhost/XE";
-private $con = null;}        
-----
+class WishDB {
 
+    // single instance of self shared among all instances
+    private static $instance = null;
+
+    // db connection config vars
+    private $user = "phpuser";
+    private $pass = "phpuserpw";
+    private $dbName = "wishlist";
+    private $dbHost = "localhost/XE";
+    private $con = null;
+
+}
+
+----
 
 [[instantiate-wishdb]]
 == Создание экземпляров класса WishDB
@@ -146,26 +131,32 @@
 Внутри класса WishDB введите или вставьте следующий код:
 
 
-[source,java]
+[source,php]
 ----
 
- //This method must be static, and must return an instance of the object if the object
- //does not already exist.
- public static function getInstance() {
-   if (!self::$instance instanceof self) {
-     self::$instance = new self;
-   }
-   return self::$instance;
- }
+// This method must be static, and must return an instance of the object if the object
+// does not already exist.
 
- // The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
- // thus eliminating the possibility of duplicate objects.
- public function __clone() {
-   trigger_error('Clone is not allowed.', E_USER_ERROR);
- }
- public function __wakeup() {
-   trigger_error('Deserializing is not allowed.', E_USER_ERROR);
- }
+public static function getInstance() {
+
+  if (!self::$instance instanceof self) {
+    self::$instance = new self;
+  }
+
+  return self::$instance;
+}
+
+// The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
+// thus eliminating the possibility of duplicate objects.
+ 
+public function __clone() {
+  trigger_error('Clone is not allowed.', E_USER_ERROR);
+}
+
+public function __wakeup() {
+  trigger_error('Deserializing is not allowed.', E_USER_ERROR);
+}
+
 ----
 
 Функция  ``getInstance``  является общедоступной и статической. Общедоступность означает возможность свободного доступа извне класса. Статическая функция доступна даже в том случае, если для класса не было создано экземпляров. Поскольку функция  ``getInstance``  вызывается для создания экземпляров класса, она является статической. Обратите внимание, что эта функция имеет доступ к статической переменной ``$instance``  и устанавливает ее значение как экземпляр класса.
@@ -183,32 +174,47 @@
 *Для базы данных MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-// private constructorprivate function __construct() {parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);if (mysqli_connect_error()) {exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}parent::set_charset('utf-8');}
+// private constructor
+private function __construct() {
+
+  parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);
+  
+  if (mysqli_connect_error()) {
+    exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
+  }
+
+  parent::set_charset('utf-8');
+}
+
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 // private constructor
 private function __construct() {
+
     $this->con = oci_connect($this->user, $this->pass, $this->dbHost);
+
     if (!$this->con) {
         $m = oci_error();
         echo $m['message'], "\n";
         exit;
     }
 }
+
 ----
 
 Следует учитывать, что вместо переменных  ``$con`` ,  ``$dbHost`` ,  ``$user``  или  ``$pass``  используется псевдопеременная  ``$this`` . Псевдопеременная  ``$this``  используется при вызове метода внутри контекста объекта. Она ссылается на значение переменной внутри этого объекта.
 
 
+[[includedFunctions]]
 == Функции класса WishDB
 
 В этом уроке рассматривается реализация следующих функций класса WishDB:
@@ -227,34 +233,55 @@
 *Для базы данных MySQL*
 
 
-[source,java]
+[[source,php]
 ----
 
-public function get_wisher_id_by_name($name) {$name = $this->real_escape_string($name);$wisher = $this->query("SELECT id FROM wishers WHERE name = '". $name . "'");
-    if ($wisher->num_rows > 0){$row = $wisher->fetch_row();return $row[0];} elsereturn null;
+public function get_wisher_id_by_name($name) {
+  
+  $name = $this->real_escape_string($name);
+  $wisher = $this->query("SELECT id FROM wishers WHERE name = '" . $name . "'");
+
+  if ($wisher->num_rows > 0){
+    $row = $wisher->fetch_row();
+    return $row[0];
+  } else {
+    return null;
+  }
 }
+
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wisher_id_by_name($name) {
+    
     $query = "SELECT id FROM wishers WHERE name = :user_bv";
     $stid = oci_parse($this->con, $query);
+    
     oci_bind_by_name($stid, ':user_bv', $name);
     oci_execute($stid);
-//Because user is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);if ($row) return $row["ID"];elsereturn null;
+    
+    //Because user is a unique value I only expect one row
+    $row = oci_fetch_array($stid, OCI_ASSOC);
+
+    if ($row) {
+      return $row["ID"];
+    } else {
+      return null;
+    }
 }
+
 ----
+
 Блок кода выполняет запрос  ``SELECT ID FROM wishers WHERE name = [переменная для имени пожелания]`` . Результат запроса - массив идентификаторов из записей, соответствующих запросу. Если массив не пустой, это по умолчанию означает, что он содержит один элемент, поскольку при создании таблицы имя поля было определено как UNIQUE. В этом случае функция возвращает первый элемент массива  ``$result``  (элемент под номером ноль). Если массив пуст, функция возвращает значение "null".
 
 *Примечание к безопасности.* Для базы данных MySQL строка  ``$name ``  используется с с escape-символом для предотвращения атак SQL-инъекций. См. link:http://en.wikipedia.org/wiki/SQL_injection[+статью энциклопедии Wikipedia о введении SQL +] и link:http://us3.php.net/mysql_real_escape_string[+документацию mysql_real_escape_string+]. Несмотря на то, что в контексте этого руководства риск возникновения опасных атак внедрения SQL маловероятен, рекомендуется исключить из участия в запросах MySQL такие строки, которые могли бы быть подвержены подобной атаке. База данных Oracle избегает данной проблемы, используя связанные переменные.
 
-
+[[getWishesByID]]
 === Функция get_wishes_by_wisher_id
 
 Эта функция возвращает зарегистрированные пожелания пользователя, и для ее выполнения в качестве входного параметра требуется идентификатор пользователя.
@@ -264,25 +291,32 @@
 *Для базы данных MySQL*
 
 
-[source,java]
+[[source,php]
 ----
 
-public function get_wishes_by_wisher_id($wisherID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);}
+public function get_wishes_by_wisher_id($wisherID) {
+  return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+}
+
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wishes_by_wisher_id($wisherID) {
-    $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ":id_bv", $wisherID);
-    oci_execute($stid);
-    return $stid;
+  
+  $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
+  $stid = oci_parse($this->con, $query);
+  
+  oci_bind_by_name($stid, ":id_bv", $wisherID);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
 
 Блок кода выполняет запрос  ``"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID``  и возвращает набор результатов, который является массивом записей, соответствующих запросу. (База данных Oracle использует связанную переменную для повышения производительности базы данных и уровня безопасности). Выделение выполняется с помощью wisherID, который является внешним ключом для таблицы  ``wishes`` .
@@ -290,6 +324,7 @@
 *Примечание.* Значение  ``идентификатора``  не требуется до занятия 7.
 
 
+[[createWisher]]
 === Функция create_wisher
 
 Функция создает новую запись в таблице "Wishers". Эта функция не возвращает каких-либо данных, и в качестве входных параметров для ее выполнения требуется имя и пароль нового пользователя.
@@ -299,55 +334,74 @@
 *Для базы данных MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-public function create_wisher ($name, $password){
-    $name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
+public function create_wisher ($name, $password) {
+
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+
+  return $this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
 }
+
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 public function create_wisher($name, $password) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':user_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
+
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($this->con, $query);
+
+  oci_bind_by_name($stid, ':user_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
+
 Блок кода выполняет запрос  ``"INSERT wishers (Name, Password) VALUES ([переменные представляющие имя и пароль нового пожелания])`` . При выполнении запроса добавляется новая запись в таблицу "Wishers" с полями "name" и "password", заполненными значениями  ``$name``  и  ``$password``  соответственно.
 
 
+[[refactoring]]
 == Реорганизация кода приложения
 
 Теперь при наличии отдельного класса для работы с базой данных дублированные блоки можно заменить вызовами соответствующих функций из этого класса. Это помогает в дальнейшем избежать ошибок и противоречий в написании кода. Усовершенствование кода, не оказывающее влияния на функциональные возможности, называется "реорганизацией".
 
-
+[[refactoringWishlistFile]]
 === Реорганизация файла wishlist.php
 
 Начнем с файла wishlist.php, поскольку он небольшой и дает возможность представить оптимизацию более иллюстративно.
 
 1. В верхней части блока <? php? > введите следующую строку, делающую возможным использование файла  ``db.php`` :
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
+
 2. Замените код, который подключается к базе данных и получает идентификатор пожелания, вызовом функции  ``get_wisher_id_by_name`` .
 
-Для *базы данных MySQL * вы заменяете следующий код:
+Для *базы данных MySQL* вы заменяете следующий код:
 
-[.line-through]#$con = mysqli_connect("localhost", "phpuser", "phpuserpw");
+[source,php]
+----
+
+// to remove
+
+ $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
@@ -356,43 +410,58 @@
 $user = mysqli_real_escape_string($con, $_GET['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='" . $user . "'");
 if (mysqli_num_rows($wisher) < 1) {
-    exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
+  exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
 }
-$row = mysqli_fetch_row($wisher);$wisherID = $row[0];
-mysqli_free_result($wisher);#
+$row = mysqli_fetch_row($wisher);
+$wisherID = $row[0];
+mysqli_free_result($wisher);
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+// to replace
+
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
+----
 
 Для *базы данных Oracle * вы заменяете следующий код:
 
-[.line-through]#$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE");
 if (!$con) {
-   $m = oci_error();
-   echo $m['message'], "\n";
-   exit;
-}
-$query = "SELECT id FROM wishers WHERE name = :user_bv";
+  $m = oci_error();
+  echo $m['message'], "\n";
+  exit;
+}        
+$query = "SELECT ID FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
-$user = $_GET["user"];
+$user = $_GET['user'];
 
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
-//Because user is a unique value I only expect one row$row = oci_fetch_array($stid, OCI_ASSOC);
+//Because user is a unique value I only expect one row
+$row = oci_fetch_array($stid, OCI_ASSOC);
 if (!$row) {
-    echo("The person " . $user . " is not found. Please check the spelling and try again" );exit;}
-$wisherID = $row["ID"]; #
+  echo("The person " . $user . " is not found. Please check the spelling and try again" );
+  exit;
+}
+$wisherID = $row['ID']; 
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
 ----
 
 Новый код сначала вызывает функцию  ``getInstance``  в WishDB. Функция  ``getInstance``  возвращает экземпляр WishDB, а код вызывает функцию  ``get_wisher_id_by_name``  в пределах данного экземпляра. Если требуемое пожелание в базе данных не найдено, код завершает процесс и отображает сообщение об ошибке.
@@ -403,159 +472,203 @@
 
 Для *базы данных MySQL * вы заменяете следующий код:
 
-[.line-through]#$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=". $wisherID);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+
+// to replace      
+ 
+$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
 
 Для *базы данных Oracle * вы заменяете следующий код:
 
-[.line-through]#$query = "select * from wishes where wisher_id = :id_bv";$stid = oci_parse($con, $query);oci_bind_by_name($stid, ":id_bv", $wisherID);oci_execute($stid);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$query = "SELECT description, due_date FROM wishes WHERE wisher_id = :id_bv";
+$stid = oci_parse($con, $query);
+oci_bind_by_name($stid, ":id_bv", $wisherID);
+oci_execute($stid);
+
+// to replace
+
+$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
+
 4. Удалите строку, которая закрывает подключение к базе данных.
 
-[source,java]
+[source,php]
 ----
 
- [.line-through]#mysqli_close($con);#
-                    or
- [.line-through]#oci_close($con);#                
+// For MYSQL database
+mysqli_close($con);
+
+// For Oracle database
+oci_close($con);
+
 ----
+
 Код не нужен, потому что подключение к базе данных автоматически закрывается при уничтожении объекта WishDB. Однако рекомендуем сохранять код, освобождающий ресурс. Вам необходимо освободить все ресурсы, которые используют подключение, чтобы убедиться в том, что оно закрыто, даже при вызове функции  ``close``  или уничтожении экземпляра с подключением к базе данных.
 
 
-===  
-
-
+[[refactoringCreateNewWisher]]
 === Реорганизация файла createNewWisher.php
 
 Реорганизация не оказывает воздействия на форму ввода HTML или код для вывода на экран соответствующих сообщений об ошибках.
 
 1. В верхней части блока <? php? > введите следующий код, делающий возможным использование файла  ``db.php`` :
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
+
 2. Удалите подтверждения подключения к базе данных ( ``$dbHost``  и пр.). Теперь они находятся в ``db.php`` .
 3. Замените код, который подключается к базе данных и получает идентификатор пожелания, вызовом функции  ``get_wisher_id_by_name`` .
 
 Для *базы данных MySQL * вы заменяете следующий код:
 
-[.line-through]#
+[source,php]
+----
+
+// to remove
+
 $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
 
-
 /** Check whether a user whose name matches the "user" field already exists */
 mysqli_select_db($con, "wishlist");
 $user = mysqli_real_escape_string($con, $_POST['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='".$user."'");
 $wisherIDnum=mysqli_num_rows($wisher);
 if ($wisherIDnum) {
-   $userNameIsUnique = false;
-}#
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 
 Для *базы данных Oracle * вы заменяете следующий код:
 
-[.line-through]#
-$con = oci_connect("phpuser", "phpuserpw", "localhost");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
 if (!$con) {
-    $m = oci_error();
-    echo $m['message'], "\n";
-    exit;
+  $m = oci_error();
+  exit('Connect Error ' . $m['message']);
 }
-$query = "select ID from wishers where name = :user_bv";
+$query = "SELECT id FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
 $user = $_POST['user'];
-$wisherID = null;
+
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
 //Each user name should be unique. Check if the submitted user already exists.
-$row = oci_fetch_array($stid, OCI_ASSOC);if ($row) {$wisherID = $row["ID"]; }if ($wisherID != null) {$userNameIsUnique = false;}#
+$row = oci_fetch_array($stid, OCI_ASSOC);
+if ($row) {
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 Объект  ``WishDB``  существует до тех пор, пока обрабатывается текущая страница. Если обработка завершена или прервана, этот объект уничтожается. Код для открытия подключения к базе данных не является необходимым, поскольку подключение выполняется посредством функции WishDB. Код для закрытия подключения также не является необходимым, поскольку подключение будет закрыто сразу же после уничтожения объекта  ``WishDB`` .
 4. Замените код, который вставляет новых авторов пожеланий в базу данных, кодом, который вызывает функцию  ``create_wisher`` .
 
 Для *базы данных MySQL * вы заменяете следующий код:
 
-[.line-through]#if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $password = mysqli_real_escape_string($con, $_POST["password"]);mysqli_select_db($con, "wishlist");mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");mysqli_free_result($wisher);mysqli_close($con);header('Location: editWishList.php');exit;}
-                    #
-
-[source,java]
+[source,php]
 ----
 
-                *if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+// to remove
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+  $password = mysqli_real_escape_string($con, $_POST['password']);
+  mysqli_select_db($con, "wishlist");
+  mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");
+  mysqli_free_result($wisher);
+  mysqli_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
 Для *базы данных Oracle * вы заменяете следующий код:
 
-[.line-through]#
-if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($con, $query);
-    $pwd = $_POST['password'];
-    oci_bind_by_name($stid, ':user_bv', $user);
-    oci_bind_by_name($stid, ':pwd_bv', $pwd);
-    oci_execute($stid);
-    oci_close($con);
-    header('Location: editWishList.php');
-    exit;
-}#
-
-[source,java]
+[source,php]
 ----
 
+// to remove
 
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
 
-*if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($con, $query);
+  $pwd = $_POST['password'];
+  oci_bind_by_name($stid, ':user_bv', $user);
+  oci_bind_by_name($stid, ':pwd_bv', $pwd);
+  oci_execute($stid);
+  oci_free_statement($stid);
+  oci_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
-
+[[lessonResultSourceCode]]
 == Исходный код приложения на момент завершения текущего урока
 
 Для пользователей MySQL: щелкните link:https://netbeans.org/projects/www/downloads/download/php%252Flesson4.zip[+сюда+] для загрузки исходного кода, отражающего состояние проекта по завершении данного урока.
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_zh_CN.asciidoc
index ee46f2a..220c5ef 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson4_zh_CN.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, 第 4 课:使用类和对象优化代码
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. 
-*=> 优化代码*
-
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 在本课中,将优化代码以便于将来进行维护。这会影响  ``createNewWisher.php``  和  ``wishlist.php``  文件。此外,还会创建一个名为  ``db.php``  的新文件。
 
 应用程序代码包含几个类似的块,其中提供了一些数据库查询。为了便于将来阅读和维护代码,您可以提取这些块,将这些块作为名为  ``WishDB``  的单独类的函数进行实现,然后将  ``WishDB``  放在  ``db.php``  中。接下来,您可以将  ``db.php``  文件包含在任何 PHP 文件中,然后使用 <<includedFunctions,WishDB 中的任何函数>>而无需复制代码。这种方法确保了对查询或函数进行的任何更改是在一个地方完成的,您不必解析整个应用程序代码。
@@ -75,7 +55,7 @@
 当前文档是“在适用于 PHP 的 NetBeans IDE 中创建 CRUD 应用程序”教程的一部分。
 
 
-
+[[previousLessonSourceCode]]
 == 来自上一课的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/files/documents/4/1929/lesson3.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
@@ -83,6 +63,7 @@
 Oracle 数据库用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson3.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
 
 
+[[createDbPhpFile]]
 == 创建 db.php 文件
 
 在 "Source Files"(源文件)文件夹中创建一个新子文件夹。将该文件夹命名为 Includes。创建一个名为 db.php 的新文件,并将其放在 Includes 中。然后,您可以在该文件夹中添加更多文件,这些文件将包含在其他 PHP 文件中。
@@ -95,6 +76,7 @@
 4. 在 "File Name"(文件名)字段中,键入 db。然后,单击 "Finish"(完成)。
 
 
+[[wishDBClass]]
 == 创建 WishDB 类
 
 要创建 WishDB 类,您需要初始化该类的变量,并实现该类的构造函数。MySQL 用户请注意,WishDB 类_扩展_了  ``mysqli`` 。这意味着 WishDB _继承_ PHP mysqli 类的函数和其他特性。在类中添加  ``mysqli `` 函数时,您会看到这种继承的重要性。
@@ -104,39 +86,45 @@
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 class WishDB extends mysqli {
 
-
     // single instance of self shared among all instances
     private static $instance = null;
 
-
     // db connection config vars
     private $user = "phpuser";
     private $pass = "phpuserpw";
     private $dbName = "wishlist";
     private $dbHost = "localhost";
+
 }
+
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-class WishDB {// single instance of self shared among all instances
-private static $instance = null;// db connection config vars
-private $user = "phpuser";
-private $pass = "phpuserpw";
-private $dbName = "wishlist";
-private $dbHost = "localhost/XE";
-private $con = null;}        
-----
+class WishDB {
 
+    // single instance of self shared among all instances
+    private static $instance = null;
+
+    // db connection config vars
+    private $user = "phpuser";
+    private $pass = "phpuserpw";
+    private $dbName = "wishlist";
+    private $dbHost = "localhost/XE";
+    private $con = null;
+
+}
+
+----
 
 [[instantiate-wishdb]]
 == 实例化 WishDB 类
@@ -146,26 +134,32 @@
 在 WishDB 类中,键入或粘贴以下代码:
 
 
-[source,java]
+[source,php]
 ----
 
- //This method must be static, and must return an instance of the object if the object
- //does not already exist.
- public static function getInstance() {
-   if (!self::$instance instanceof self) {
-     self::$instance = new self;
-   }
-   return self::$instance;
- }
+// This method must be static, and must return an instance of the object if the object
+// does not already exist.
 
- // The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
- // thus eliminating the possibility of duplicate objects.
- public function __clone() {
-   trigger_error('Clone is not allowed.', E_USER_ERROR);
- }
- public function __wakeup() {
-   trigger_error('Deserializing is not allowed.', E_USER_ERROR);
- }
+public static function getInstance() {
+
+  if (!self::$instance instanceof self) {
+    self::$instance = new self;
+  }
+
+  return self::$instance;
+}
+
+// The clone and wakeup methods prevents external instantiation of copies of the Singleton class,
+// thus eliminating the possibility of duplicate objects.
+ 
+public function __clone() {
+  trigger_error('Clone is not allowed.', E_USER_ERROR);
+}
+
+public function __wakeup() {
+  trigger_error('Deserializing is not allowed.', E_USER_ERROR);
+}
+
 ----
 
  ``getInstance``  函数为 "public" 和 "static"。"Public" 表示可以从类外部任意访问该函数。"Static" 表示即使未实例化类,也可以使用该函数。在调用  ``getInstance``  函数以实例化类时,该函数必须是静态的。请注意,该函数访问静态  ``$instance``  变量,并将其值设置为类实例。
@@ -183,32 +177,48 @@
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-// private constructorprivate function __construct() {parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);if (mysqli_connect_error()) {exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());}parent::set_charset('utf-8');}
+// private constructor
+private function __construct() {
+
+  parent::__construct($this->dbHost, $this->user, $this->pass, $this->dbName);
+  
+  if (mysqli_connect_error()) {
+    exit('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
+  }
+
+  parent::set_charset('utf-8');
+}
+
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+*For the Oracle database:*
+
+[source,php]
 ----
 
 // private constructor
 private function __construct() {
+
     $this->con = oci_connect($this->user, $this->pass, $this->dbHost);
+
     if (!$this->con) {
         $m = oci_error();
         echo $m['message'], "\n";
         exit;
     }
 }
+
 ----
 
 请注意,使用了伪变量  ``$this`` ,而不是使用  ``$con`` 、 ``$dbHost`` 、 ``$user``  或  ``$pass``  变量。从对象上下文中调用方法时,将使用伪变量  ``$this`` 。它引用该对象中的变量值。
 
-
+[[includedFunctions]]
 == WishDB 类中的函数
 
 在本课中,将实现 WishDB 类的以下函数:
@@ -217,7 +227,7 @@
 * <<getWishesByID,get_wishes_by_wisher_id>> - 使用特定 ID 检索许愿者的愿望列表
 * <<createWisher,create_wisher>> - 将新许愿者记录添加到 wishers 表中
 
-
+[[getIDByName]]
 === 函数 get_wisher_id_by_name
 
 该函数要求将许愿者名字作为输入参数,并返回许愿者的 ID。 
@@ -227,34 +237,55 @@
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[[source,php]
 ----
 
-public function get_wisher_id_by_name($name) {$name = $this->real_escape_string($name);$wisher = $this->query("SELECT id FROM wishers WHERE name = '". $name . "'");
-    if ($wisher->num_rows > 0){$row = $wisher->fetch_row();return $row[0];} elsereturn null;
+public function get_wisher_id_by_name($name) {
+  
+  $name = $this->real_escape_string($name);
+  $wisher = $this->query("SELECT id FROM wishers WHERE name = '" . $name . "'");
+
+  if ($wisher->num_rows > 0){
+    $row = $wisher->fetch_row();
+    return $row[0];
+  } else {
+    return null;
+  }
 }
+
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wisher_id_by_name($name) {
+    
     $query = "SELECT id FROM wishers WHERE name = :user_bv";
     $stid = oci_parse($this->con, $query);
+    
     oci_bind_by_name($stid, ':user_bv', $name);
     oci_execute($stid);
-//Because user is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);if ($row) return $row["ID"];elsereturn null;
+    
+    //Because user is a unique value I only expect one row
+    $row = oci_fetch_array($stid, OCI_ASSOC);
+
+    if ($row) {
+      return $row["ID"];
+    } else {
+      return null;
+    }
 }
+
 ----
+
 该代码块执行  ``SELECT ID FROM wishers WHERE name = [variable for name of the wisher]``  查询。查询结果是一个数组,其中包含符合查询条件的记录中的 ID。如果该数组不为空,则自动表示它包含一个元素,这是因为在创建表期间将字段名称指定为 UNIQUE。在本示例中,该函数返回  ``$result``  数组的第一个元素(编号为零的元素)。如果数组为空,该函数将返回空值。
 
 *安全注意事项:*对于 MySQL 数据库,将转义  ``$name``  字符串以防止 SQL 注入攻击。请参见link:http://en.wikipedia.org/wiki/SQL_injection[+有关 SQL 注入的维基百科+]和 link:http://us3.php.net/mysql_real_escape_string[+mysql_real_escape_string 文档+]。虽然在本教程的上下文中,您不会遇到有害 SQL 注入的风险,但最佳做法是转义存在此类攻击风险的 MySQL 查询中的字符串。Oracle 数据库通过使用绑定变量来避免该问题。
 
-
+[[getWishesByID]]
 === 函数 get_wishes_by_wisher_id
 
 该函数要求将许愿者 ID 作为输入参数,并返回为许愿者注册的愿望。
@@ -264,32 +295,39 @@
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wishes_by_wisher_id($wisherID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);}
+public function get_wishes_by_wisher_id($wisherID) {
+  return $this->query("SELECT id, description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+}
+
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wishes_by_wisher_id($wisherID) {
-    $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ":id_bv", $wisherID);
-    oci_execute($stid);
-    return $stid;
+  
+  $query = "SELECT id, description, due_date FROM wishes WHERE wisher_id = :id_bv";
+  $stid = oci_parse($this->con, $query);
+  
+  oci_bind_by_name($stid, ":id_bv", $wisherID);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
 
 该代码块执行  ``"SELECT id, description, due_date FROM wishes WHERE wisherID=" . $wisherID``  查询并返回一个结果集,这是一个符合查询条件的记录数组。(出于数据库性能和安全考虑,Oracle 数据库使用绑定变量。)数据选择是按 wisherID 执行的,这是  ``wishes``  表的外键。
 
 *注:*在第 7 课之前,您不需要使用  ``id``  值。
 
-
+[[createWisher]]
 === 函数 create_wisher
 
 该函数在 wishers 表中创建一个新记录。该函数要求将新许愿者的名字和口令作为输入参数,并且不返回任何数据。
@@ -299,55 +337,72 @@
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function create_wisher ($name, $password){
-    $name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
+public function create_wisher ($name, $password) {
+
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+
+  return $this->query("INSERT INTO wishers (name, password) VALUES ('" . $name . "', '" . $password . "')");
 }
+
 ----
 
 *对于 Oracle 数据库:*
 
-
-[source,java]
+[source,php]
 ----
 
 public function create_wisher($name, $password) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':user_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
+
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($this->con, $query);
+
+  oci_bind_by_name($stid, ':user_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+  return $stid;
 }
+
 ----
+
 该代码块执行  ``"INSERT wishers (Name, Password) VALUES ([variables representing name and password of new wisher])``  查询。该查询在 "wishers" 表中添加一个新记录,并分别使用  ``$name``  和  ``$password``  值填充 "name" 和 "password" 字段。
 
-
+[[refactoring]]
 == 重构应用程序代码
 
 现在,您已创建了一个单独的类以使用数据库,接下来便可将重复的块替换为对该类中的相关函数的调用。这有助于避免将来出现拼写错误和不一致的情况。不影响功能的代码优化称为“重构”。
 
-
+[[refactoringWishlistFile]]
 === 重构 wishlist.php 文件
 
 请从 wishlist.php 文件入手,因为该文件很短,改进更能说明问题。
 
 1. 在 <?php ?> 块的顶部,输入以下行以允许使用  ``db.php``  文件:
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
+
 2. 将连接到数据库并获取许愿者 ID 的代码替换为  ``get_wisher_id_by_name``  函数调用。
 
 对于 *MySQL 数据库*,替换的代码为:
 
-[.line-through]#$con = mysqli_connect("localhost", "phpuser", "phpuserpw");
+[source,php]
+----
+
+// to remove
+
+ $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
@@ -356,43 +411,58 @@
 $user = mysqli_real_escape_string($con, $_GET['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='" . $user . "'");
 if (mysqli_num_rows($wisher) < 1) {
-    exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
+  exit("The person " . $_GET['user'] . " is not found. Please check the spelling and try again");
 }
-$row = mysqli_fetch_row($wisher);$wisherID = $row[0];
-mysqli_free_result($wisher);#
+$row = mysqli_fetch_row($wisher);
+$wisherID = $row[0];
+mysqli_free_result($wisher);
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+// to replace
+
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
+----
 
 对于 *Oracle 数据库*,替换的代码为:
 
-[.line-through]#$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE");
 if (!$con) {
-   $m = oci_error();
-   echo $m['message'], "\n";
-   exit;
-}
-$query = "SELECT id FROM wishers WHERE name = :user_bv";
+  $m = oci_error();
+  echo $m['message'], "\n";
+  exit;
+}        
+$query = "SELECT ID FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
-$user = $_GET["user"];
+$user = $_GET['user'];
 
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
-//Because user is a unique value I only expect one row$row = oci_fetch_array($stid, OCI_ASSOC);
+//Because user is a unique value I only expect one row
+$row = oci_fetch_array($stid, OCI_ASSOC);
 if (!$row) {
-    echo("The person " . $user . " is not found. Please check the spelling and try again" );exit;}
-$wisherID = $row["ID"]; #
+  echo("The person " . $user . " is not found. Please check the spelling and try again" );
+  exit;
+}
+$wisherID = $row['ID']; 
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_GET["user"]);
+
 if (!$wisherID) {
-    exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
-}*
+  exit("The person " .$_GET["user"]. " is not found. Please check the spelling and try again" );
+}
+
 ----
 
 新代码先调用 WishDB 中的  ``getInstance``  函数。 ``getInstance``  函数返回一个 WishDB 实例,然后代码在该实例中调用  ``get_wisher_id_by_name``  函数。如果在数据库中找不到请求的许愿者,代码将终止该进程,然后显示一条错误消息。
@@ -403,159 +473,204 @@
 
 对于 *MySQL 数据库*,替换的代码为:
 
-[.line-through]#$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=". $wisherID);#
-
-[source,java]
+[[source,php]
 ----
 
-                
-*$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$result = mysqli_query($con, "SELECT description, due_date FROM wishes WHERE wisher_id=" . $wisherID);
+
+// to replace      
+ 
+$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
 
 对于 *Oracle 数据库*,替换的代码为:
 
-[.line-through]#$query = "select * from wishes where wisher_id = :id_bv";$stid = oci_parse($con, $query);oci_bind_by_name($stid, ":id_bv", $wisherID);oci_execute($stid);#
-
-[source,java]
+[source,php]
 ----
 
-                
-*$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);*
+// to remove
+
+$query = "SELECT description, due_date FROM wishes WHERE wisher_id = :id_bv";
+$stid = oci_parse($con, $query);
+oci_bind_by_name($stid, ":id_bv", $wisherID);
+oci_execute($stid);
+
+// to replace
+
+$stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+
 ----
+
 4. 删除关闭数据库连接的行。
 
-[source,java]
+[source,php]
 ----
 
- [.line-through]#mysqli_close($con);#
-                    or
- [.line-through]#oci_close($con);#                
+// For MYSQL database
+mysqli_close($con);
+
+// For Oracle database
+oci_close($con);
+
 ----
+
 不需要该代码,因为在销毁 WishDB 对象时自动关闭数据库连接。不过,保留了释放资源的代码。即使您调用了  ``close``  函数或销毁了使用数据库连接的实例,也需要释放使用连接的所有资源以确保正确关闭连接。
 
 
-===  
-
-
+[[refactoringCreateNewWisher]]
 === 重构 createNewWisher.php 文件
 
 重构不影响 HTML 输入窗体或显示相关错误消息的代码。
 
 1. 在 <?php?> 块的顶部,输入以下代码以允许使用  ``db.php``  文件:
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
+
 ----
+
 2. 删除数据库连接凭证( ``$dbHost``  等)。这些凭证现在包含在  ``db.php``  中。
 3. 将连接到数据库并获取许愿者 ID 的代码替换为  ``get_wisher_id_by_name``  函数调用。
 
 对于 *MySQL 数据库*,替换的代码为:
 
-[.line-through]#
+[source,php]
+----
+
+// to remove
+
 $con = mysqli_connect("localhost", "phpuser", "phpuserpw");
 if (!$con) {
-    exit('Connect Error (' . mysqli_connect_errno() . ') '
-            . mysqli_connect_error());
+  exit('Connect Error (' . mysqli_connect_errno() . ') '
+          . mysqli_connect_error());
 }
 //set the default client character set 
 mysqli_set_charset($con, 'utf-8');
 
-
 /** Check whether a user whose name matches the "user" field already exists */
 mysqli_select_db($con, "wishlist");
 $user = mysqli_real_escape_string($con, $_POST['user']);
 $wisher = mysqli_query($con, "SELECT id FROM wishers WHERE name='".$user."'");
 $wisherIDnum=mysqli_num_rows($wisher);
 if ($wisherIDnum) {
-   $userNameIsUnique = false;
-}#
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
 
 对于 *Oracle 数据库*,替换的代码为:
 
-[.line-through]#
-$con = oci_connect("phpuser", "phpuserpw", "localhost");
+[source,php]
+----
+
+// to remove
+
+$con = oci_connect("phpuser", "phpuserpw", "localhost/XE", "AL32UTF8");
 if (!$con) {
-    $m = oci_error();
-    echo $m['message'], "\n";
-    exit;
+  $m = oci_error();
+  exit('Connect Error ' . $m['message']);
 }
-$query = "select ID from wishers where name = :user_bv";
+$query = "SELECT id FROM wishers WHERE name = :user_bv";
 $stid = oci_parse($con, $query);
 $user = $_POST['user'];
-$wisherID = null;
+
 oci_bind_by_name($stid, ':user_bv', $user);
 oci_execute($stid);
 
 //Each user name should be unique. Check if the submitted user already exists.
-$row = oci_fetch_array($stid, OCI_ASSOC);if ($row) {$wisherID = $row["ID"]; }if ($wisherID != null) {$userNameIsUnique = false;}#
+$row = oci_fetch_array($stid, OCI_ASSOC);
+if ($row) {
+  $userNameIsUnique = false;
+}
 
-[source,java]
-----
+// to replace
 
-
-*$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_POST["user"]);
 if ($wisherID) {
-$userNameIsUnique = false;
-}*
+  $userNameIsUnique = false;
+}
+
 ----
+
 只要处理当前页面, ``WishDB``  对象就会存在。在处理完成或中断后,将销毁该对象。不需要用于打开数据库连接的代码,因为该操作是由 WishDB 函数完成的。不需要用于关闭连接的代码,因为在销毁  ``WishDB``  对象后,将立即关闭连接。
 4. 将在数据库中插入新许愿者的代码替换为调用  ``create_wisher``  函数的代码。
 
 对于 *MySQL 数据库*,替换的代码为:
 
-[.line-through]#if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $password = mysqli_real_escape_string($con, $_POST["password"]);mysqli_select_db($con, "wishlist");mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");mysqli_free_result($wisher);mysqli_close($con);header('Location: editWishList.php');exit;}
-                    #
-
-[source,java]
+[source,php]
 ----
 
-                *if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+// to remove
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+  $password = mysqli_real_escape_string($con, $_POST['password']);
+  mysqli_select_db($con, "wishlist");
+  mysqli_query($con, "INSERT wishers (name, password) VALUES ('" . $user . "', '" . $password . "')");
+  mysqli_free_result($wisher);
+  mysqli_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
 对于 *Oracle 数据库*,替换的代码为:
 
-[.line-through]#
-if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-    $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
-    $stid = oci_parse($con, $query);
-    $pwd = $_POST['password'];
-    oci_bind_by_name($stid, ':user_bv', $user);
-    oci_bind_by_name($stid, ':pwd_bv', $pwd);
-    oci_execute($stid);
-    oci_close($con);
-    header('Location: editWishList.php');
-    exit;
-}#
-
-[source,java]
+[source,php]
 ----
 
+// to remove
 
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
 
-*if (!$userIsEmpty &amp;&amp; $userNameIsUnique &amp;&amp; !$passwordIsEmpty &amp;&amp; !$password2IsEmpty &amp;&amp; $passwordIsValid) {
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
-header('Location: editWishList.php' );
-exit;
-}*
+  $query = "INSERT INTO wishers (name, password) VALUES (:user_bv, :pwd_bv)";
+  $stid = oci_parse($con, $query);
+  $pwd = $_POST['password'];
+  oci_bind_by_name($stid, ':user_bv', $user);
+  oci_bind_by_name($stid, ':pwd_bv', $pwd);
+  oci_execute($stid);
+  oci_free_statement($stid);
+  oci_close($con);
+  header('Location: editWishList.php');
+  exit;
+}
+
+// to replace
+
+if (!$userIsEmpty && $userNameIsUnique && !$passwordIsEmpty && !$password2IsEmpty && $passwordIsValid) {
+
+  WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+
+  header('Location: editWishList.php' );
+  exit;
+}
+
 ----
 
-
+[[lessonResultSourceCode]]
 == 完成当前课程后的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Flesson4.zip[+此处+]以下载源代码,该代码反映了在完成课程后的项目状态。
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5.asciidoc
index 681c08a..7080681 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5.asciidoc
@@ -40,112 +40,78 @@
 :description: Lesson 5: Adding Security. Implementing Application User Logon - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lesson 5: Adding Security. Implementing Application User Logon
 
-
-Tutorial contents:
-
-1. link:wish-list-tutorial-main-page.html[+Creating a Database Driven Application With PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. link:wish-list-oracle-lesson1.html[+Creating Oracle Database Tables+]
-3. link:wish-list-lesson2.html[+Designing the Application. Reading from the Database +]
-4. link:wish-list-lesson3.html[+Creating a New Application User+]
-5. link:wish-list-lesson4.html[+ Optimizing the Code+]
-6. 
-*=> Adding Security. Implementing Application User Logon*
-
-* <<previousLessonSourceCode,Application Source Code from the Previous Lesson>>
-* <<savingWisherIDInSessionUponCreation,Saving the Wisher's ID in the Session Upon Creation>>
-* <<validateWisherLogon,Validating User Logon>>
-* <<retrievingUserNameFromSession,Retrieving the wisher's name from the Session>>
-* <<redirectingNotLoggedInUserToIndexPage,Redirecting a User Who Is Not Logged In>>
-* <<logonFromIndexPage,Logging In from the index.php Page>>
-* <<logonForm,HTML Form for Logon on index.php>>
-* <<logonValidation,Logon Validation>>
-* <<verifyWisherCredentials,Function verify_wisher_credentials>>
-* <<displayErrorMessage,Displaying Error Messages>>
-* <<testingLogonFromIndexPage,Testing the Logon from the index.php Page>>
-* <<lessonResultSourceCode,Application Source Code after the Current Lesson Is Completed>>
-7. link:wish-list-lesson6.html[+Adding a New Wish to the Database+]
-8. link:wish-list-lesson7.html[+Updating and Deleting Entries in the Database+]
-9. link:wish-list-lesson8.html[+Making the Application Look Better Using the CSS Technology+]
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Content on this page applies to the NetBeans IDE 7.2, 7.3, 7.4 and 8.0"]
-
 In this lesson you implement the logon functionality for a wisher. This affects the following files:
 
-*  ``index.php`` 
-*  ``createNewWisher.php`` 
-*  ``editWishlist.php`` 
-*  ``db.php`` 
+*  `index.php` 
+*  `createNewWisher.php` 
+*  `editWishlist.php` 
+*  `db.php` 
 
 Implementing the logon functionality consists of the following steps:
 
-1. <<savingWisherIDInSessionUponCreation,Saving the wisher's ID in the Session upon the creation of a wisher>>
-2. <<validateWisherLogon,Validating that the user who attempts to edit a wish list is logged in>>
-3. <<logonFromIndexPage,Logging on wisher from the index.php page>>
+1. <<_saving_the_wisher_s_id_in_the_session_upon_creation,Saving the wisher's ID in the Session upon the creation of a wisher>>
+2. <<_validating_user_logon,Validating that the user who attempts to edit a wish list is logged in>>
+3. <<_html_form_for_logon_on_index_php,Logging on wisher from the index.php page>>
 
 The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == Application Source Code from the Previous Lesson
 
 MySQL users: Click link:https://netbeans.org/files/documents/4/1930/lesson4.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+ here+] to download the source code that reflects the project state after the previous lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-
+[[_saving_the_wisher_s_id_in_the_session_upon_creation]]
 == Saving the Wisher's ID in the Session Upon Creation
 
-A link:http://us2.php.net/manual/en/ref.session.php[+Session+] is persistent storage for transferring information from one page to another without using an link:wish-list-lesson5.html#htmlForm[+HTML input form+]. This functionality is supported through the predefined PHP array  ``$_SESSION`` .
+A link:http://us2.php.net/manual/en/ref.session.php[+Session+] is persistent storage for transferring information from one page to another without using an link:wish-list-lesson5.html#_html_form_for_logon_on_index_php[+HTML input form+]. This functionality is supported through the predefined PHP array  `$_SESSION` .
 
-For the sake of security, after a new wisher is created he should be logged on automatically without filling in a form. Therefore you need to modify the  ``createNewWisher.php``  file to implement the following functionality:
+For the sake of security, after a new wisher is created he should be logged on automatically without filling in a form. Therefore you need to modify the  `createNewWisher.php`  file to implement the following functionality:
 
 * Add a new wisher to the database.
 * Open a session.
 * Store the wisher's name in the session.
-* Transfer the wisher's name in the session when the wisher is redirected to the  ``editWishList.php``  page.
+* Transfer the wisher's name in the session when the wisher is redirected to the  `editWishList.php`  page.
 
-In the  ``createNewWisher.php``  file, locate the line:
+In the  `createNewWisher.php`  file, locate the line:
 
 
-[source,java]
+[source,php]
 ----
 
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+WishDB::getInstance()->create_wisher($_POST['user'], $_POST['password']);
 ----
 
 and enter the following code block right below:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 $_SESSION['user'] = $_POST['user'];
 ----
 
-The code block starts a session, which means opening the  ``$_SESSION``  array for entering or retrieving data. Then the code adds an element to the  ``$_SESSION``  array. The added element contains a value and an identifier (key). The value is the name of the newly created wishers and the identifier is "user". Then the program redirects the wisher to the  ``editWishList.php``  page.
+The code block starts a session, which means opening the  `$_SESSION`  array for entering or retrieving data. Then the code adds an element to the  `$_SESSION`  array. The added element contains a value and an identifier (key). The value is the name of the newly created wishers and the identifier is "user". Then the program redirects the wisher to the  `editWishList.php`  page.
 
-
+[[_validating_user_logon]]
 == Validating User Logon
 
-When a user reaches the  ``editWishList.php``  page the application should confirm that the page is accessed by the same person who was just registered on the  ``createNewWisher.php``  page.
+When a user reaches the  `editWishList.php`  page the application should confirm that the page is accessed by the same person who was just registered on the  `createNewWisher.php`  page.
 
 Implementing this functionality consists of two steps:
 
-* <<retrievingUserNameFromSession,Retrieving the wisher's name from the Session>>
-* <<redirectingNotLoggedInUserToIndexPage,Redirecting the user to the index.php if retrieving the wisher's name from the Session failed>>
+* <<_retrieving_the_wisher_s_name_from_the_session,Retrieving the wisher's name from the Session>>
+* <<_logging_in_from_the_index_php_page,Redirecting the user to the index.php if retrieving the wisher's name from the Session failed>>
 
-
+[[_retrieving_the_wisher_s_name_from_the_session]]
 === Retrieving the Wisher's Name from the Session
 
-Replace the default code in the PHP block of  ``editWishList.php``  with the following:
+Replace the default code in the PHP block of  `editWishList.php`  with the following:
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -154,21 +120,21 @@
 }
 ----
 
-The code block opens the  ``$_SESSION``  array for retrieving data and verifies that  ``$_SESSION``  contains an element with the identifier "user". If the check is successful, the code prints a welcome message.
+The code block opens the  `$_SESSION`  array for retrieving data and verifies that  `$_SESSION`  contains an element with the identifier "user". If the check is successful, the code prints a welcome message.
 
 To check that the session is implemented correctly:
 
-1. Run the  ``createNewWisher.php``  file and create a new wisher, for example Jack.
-The  ``editWishList.php``  opens with Hello Jack.
-2. Clear session cookies in your browser or end the session and run  ``editWishList.php``  from the IDE.
-The  ``editWishList.php``  file opens with Hello because no user has been transferred through a session. This is not correct because it enables someone who is not logged in and not registered to create or edit a wish list. In order to avoid this, the user needs to be redirected to the  ``index.php``  page.
+1. Run the  `createNewWisher.php`  file and create a new wisher, for example Jack.
+The  `editWishList.php`  opens with Hello Jack.
+2. Clear session cookies in your browser or end the session and run  `editWishList.php`  from the IDE.
+The  `editWishList.php`  file opens with Hello because no user has been transferred through a session. This is not correct because it enables someone who is not logged in and not registered to create or edit a wish list. In order to avoid this, the user needs to be redirected to the  `index.php`  page.
 
-
+[[_logging_in_from_the_index_php_page]]
 === Redirecting a User Who Is Not Logged In
 
-Add the following code block to  ``editWishList.php`` , below the  ``if``  clause:
+Add the following code block to  `editWishList.php` , below the  `if`  clause:
 
-[source,java]
+[source,php]
 ----
 
 else {
@@ -179,47 +145,47 @@
 
 The code redirects the user to the index.php page and cancels PHP code execution.
 
-To check that the functionality is implemented correctly, run the  ``editWishList.php``  file. The expected result is that the  ``index.php``  page opens.
+To check that the functionality is implemented correctly, run the  `editWishList.php`  file. The expected result is that the  `index.php`  page opens.
 
-
+[[_html_form_for_logon_on_index_php]]
 == Logging In from the index.php Page
 
 The logon from the index.php page consists of two steps:
 
-* <<logonForm,Entering the user's name and password in an HTML input form and submitting the data for validation to the index.php page.>>
-* <<logonValidation,Validating the logon>>
+* <<_html_form_for_logon_on_index_php,Entering the user's name and password in an HTML input form and submitting the data for validation to the index.php page.>>
+* <<_logon_validation,Validating the logon>>
 
-
+[[_html_form_for_logon_on_index_php]]
 === HTML Form for Logon on index.php
 
-In the  ``index.php``  file, enter the following code before the closing  ``</body>``  tag:
+In the  `index.php`  file, enter the following code before the closing  `</body>`  tag:
 
 [source,xml]
 ----
 
 <form name="logon" action="index.php" method="POST" >
-    Username: <input type="text" name="user">
-    Password  <input type="password" name="userpassword">
-    <input type="submit" value="Edit My Wish List">
+  Username: <input type="text" name="user">
+  Password  <input type="password" name="userpassword">
+  <input type="submit" value="Edit My Wish List">
 </form>
 ----
 
-*Note: *You can ignore warnings from the HTML validator.
+*Note:* You can ignore warnings from the HTML validator.
 
 The code presents an link:wish-list-lesson3.html#htmlForm[+HTML form+] that enables entering the name and password of the user in the text fields. When the user clicks Edit My Wish List, the data is transferred to the same page, index.php.
 
-
+[[_logon_validation]]
 === Logon Validation
 
 Logon validation involves:
 
-* <<checkWhereUserCameFrom,Checking where the user was redirected from>>.
-* <<verifyCredentials,Verifying the user's name and password>>.
-* Saving the user name to the Session and redirecting the user to the editWishList.php page or <<displayErrorMessage,Displaying an error message.>>
+* <<_logon_validation,Checking where the user was redirected from>>.
+* <<_logon_validation,Verifying the user's name and password>>.
+* Saving the user name to the Session and redirecting the user to the editWishList.php page or <<_logon_validation,Displaying an error message.>>
 
-A user may access the  ``index.php``  page on starting the application, or from the<<validateWisherLogon, editWishList.php>> page, or when redirected from the  ``index.php``  page after entering name and password.
+A user may access the  `index.php`  page on starting the application, or from the <<_function_verify_wisher_credentials, editWishList.php>> page, or when redirected from the  `index.php`  page after entering name and password.
 
-Because only in the last case is the link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTML request method+] POST used, you can always learn where the user was located when they accessed  ``index.php`` .
+Because only in the last case is the link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTML request method+] POST used, you can always learn where the user was located when they accessed  `index.php` .
 
 In the index.php file, create a <?php ?> block above the HTML block, with the following code:
 
@@ -227,107 +193,115 @@
 ----
 
 <?php
-
 require_once("Includes/db.php");
-$logonSuccess = false;// verify user's credentials
+$logonSuccess = false;
+
+// verify user's credentials
 if ($_SERVER['REQUEST_METHOD'] == "POST") {
     $logonSuccess = (WishDB::getInstance()->verify_wisher_credentials($_POST['user'], $_POST['userpassword']));
     if ($logonSuccess == true) {
-        session_start();
-        $_SESSION['user'] = $_POST['user'];
-        header('Location: editWishList.php');
-        exit;
+      session_start();
+      $_SESSION['user'] = $_POST['user'];
+      header('Location: editWishList.php');
+      exit;
     }
 }
 ?>
-
 ----
 
-The top of the code block enables the use of the  ``db.php``  file and initializes the  ``$logonSuccess``  variable with the value  ``false`` . If validation succeeds, this value will change to  ``true`` .
+The top of the code block enables the use of the  `db.php`  file and initializes the  `$logonSuccess`  variable with the value  `false` . If validation succeeds, this value will change to  `true` .
 
-The code that verifies the user's credentials first checks if the request method is POST. If the request method is POST, the user was redirected after submitting the <<logonForm,logon form>>. In this case, the code block calls the  ``verify_wisher_credentials``  function with the name and password entered in the logon form.
+The code that verifies the user's credentials first checks if the request method is POST. If the request method is POST, the user was redirected after submitting the <<_html_form_for_logon_on_index_php,logon form>>. In this case, the code block calls the  `verify_wisher_credentials`  function with the name and password entered in the logon form.
 
-The  ``verify_wisher_credentials``  function, which you write in <<verifyWisherCredentials,the next section>>, checks whether there is a record in the  ``wishers``  table where the user and password match the values submitted in the <<logonForm,logon form>>. If the  ``verify_wisher_credentials``  function returns  ``true`` , a wisher with the specified combination of name and password is registered in the database. This means that validation succeeds, and  ``$logonSuccess``  changes value to  ``true`` . In this case, a session starts, and the  ``$_SESSION``  array opens. The code adds a new element to the  ``$_SESSION``  array. The element contains a value and an identifier (key). The value is the name of the wisher and the identifier is "user". Then the code redirects the user to the  ``editWishList.php``  page in order to edit the wish list.
+The  `verify_wisher_credentials`  function, which you write in <<_function_verify_wisher_credentials,the next section>>, checks whether there is a record in the  `wishers`  table where the user and password match the values submitted in the <<_html_form_for_logon_on_index_php,logon form>>. If the  `verify_wisher_credentials`  function returns  `true` , a wisher with the specified combination of name and password is registered in the database. This means that validation succeeds, and  `$logonSuccess`  changes value to  `true` . In this case, a session starts, and the  `$_SESSION`  array opens. The code adds a new element to the  `$_SESSION`  array. The element contains a value and an identifier (key). The value is the name of the wisher and the identifier is "user". Then the code redirects the user to the  `editWishList.php`  page in order to edit the wish list.
 
-If the  ``verify_wisher_credentials``  function returns  ``false`` , the value of the  ``$logonSuccess``  variable remains false. The value of the variable is used in <<displayErrorMessage,displaying an error message>>.
+If the  `verify_wisher_credentials`  function returns  `false` , the value of the  `$logonSuccess`  variable remains false. The value of the variable is used in <<_displaying_error_messages,displaying an error message>>.
 
-
+[[_function_verify_wisher_credentials]]
 === Function verify_wisher_credentials
 
-In order to implement verification of the wisher's credentials, you need to add a new function to the  ``WishDB``  class in the  ``db.php``  file. The function requires a name and a password as the input parameters and returns 0 or 1.
+In order to implement verification of the wisher's credentials, you need to add a new function to the  `WishDB`  class in the  `db.php`  file. The function requires a name and a password as the input parameters and returns 0 or 1.
 
 *For the MySQL database*, enter the following code block:
 
-[source,java]
-----
-
-public function verify_wisher_credentials ($name, $password){$name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$result = $this->query("SELECT 1 FROM wishers
- 	           WHERE name = '" . $name . "' AND password = '" . $password . "'");
-   return $result->data_seek(0);
-}
-----
-
-*For the Oracle Database*, enter the following code block (Because OCI8 has no equivalent to  ``mysql_num_rows`` , this code is a modified form of  ``get_wisher_id_by_name`` ):
-
-
-[source,java]
+[source,php]
 ----
 
 public function verify_wisher_credentials($name, $password) {
-    $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':name_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
-//Because name is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);
-    if ($row) 
-        return true;
-    else
-        return false;
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+  $result = $this->query("SELECT 1 FROM wishers WHERE name = '"
+                  . $name . "' AND password = '" . $password . "'");
+  return $result->data_seek(0);
 }
 ----
 
-The code block executes the query  `` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '" . $password . "'"``  and returns the number of records that meet the specified query. If such record is found, the function returns  ``true`` . If there is no such record in the database, the function returns  ``false`` .
+*For the Oracle Database*, enter the following code block (Because OCI8 has no equivalent to  `mysql_num_rows` , this code is a modified form of  `get_wisher_id_by_name` ):
 
 
+[source,php]
+----
+
+public function verify_wisher_credentials($name, $password) {
+  $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
+  $stid = oci_parse($this->con, $query);
+  oci_bind_by_name($stid, ':name_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+//Because name is a unique value I only expect one row
+  $row = oci_fetch_array($stid, OCI_ASSOC);
+  if ($row)
+    return true;
+  else
+    return false;
+}
+----
+
+The code block executes the query  ` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '" . $password . "'"`  and returns the number of records that meet the specified query. If such record is found, the function returns  `true` . If there is no such record in the database, the function returns  `false` .
+
+[[_displaying_error_messages]]
 === Displaying Error Messages
 
-In order to enable the application to display error messages, enter the following <? php ?> code block into the logon form in  ``index.php`` , below the input fields but above the button:
+In order to enable the application to display error messages, enter the following <? php ?> code block into the logon form in  `index.php` , below the input fields but above the button:
 
 [source,php]
 ----
 
 <?php
-  if ($_SERVER["REQUEST_METHOD"] == "POST") { 
-      if (!$logonSuccess)
-          echo "Invalid name and/or password";
-  }
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
+  if (!$logonSuccess)
+    echo "Invalid name and/or password";
+}
 ?>
 ----
+
 The code block checks the value of the $logonSuccess variable and if it is false, displays an error message.
 
-
+[[_testing_the_logon_from_the_index_php_page]]
 == Testing the Logon from the index.php Page
 
-To check that the logon functionality works correctly on the  ``index.php``  front page:
+To check that the logon functionality works correctly on the  `index.php`  front page:
 
 1. Run the application.
-2. On the  ``index.php``  page, enter Tom in the Username edit box and Tim in the Password edit box.
+2. On the  `index.php`  page, enter Tom in the Username edit box and Tim in the Password edit box.
 3. Press Edit My Wish List. An error message is displayed (Note that browser window below is reduced to 600px width, which adds some line breaks): 
+
 image::images/incorrectNamePasswordIndex.png[]
+
 4. Enter Tom in the Username edit box and tomcat in the Password edit box.
 5. Press Edit My Wish list. The editWishList.php page is displayed: 
+
 image::images/SuccessfulLogonOnIndexRedirectToEditWishList.png[]
 
-
+[[application_source_code_after_the_current_lesson_is_completed]]
 == Application Source Code after the Current Lesson Is Completed
 
-MySQL users: Click link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+MySQL users: Click link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-
+[[_next_steps]]
 == Next Steps
 
 link:wish-list-lesson4.html[+<< Previous lesson+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ja.asciidoc
index 0742c0d..2cdf66b 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ja.asciidoc
@@ -42,153 +42,133 @@
 :keywords: Apache NetBeans, Tutorials, レッスン5: セキュリティの追加。アプリケーション・ユーザー・ログオンの実装
 
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. 
-*=> セキュリティの追加。アプリケーション・ユーザー・ログオンの実装*
-
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 このレッスンでは、ウィッシャ用のログオン機能を実装します。これは次のファイルに影響します。
 
-*  ``index.php`` 
-*  ``createNewWisher.php`` 
-*  ``editWishlist.php`` 
-*  ``db.php`` 
+*  `index.php` 
+*  `createNewWisher.php` 
+*  `editWishlist.php` 
+*  `db.php` 
 
 ログオン機能の実装は、次の手順で構成されています。
 
-1. <<savingWisherIDInSessionUponCreation,ウィッシャの作成時に、セッションにウィッシャのIDを保存する>>
-2. <<validateWisherLogon,ウィッシュ・リストを編集しようとするユーザーがログインしていることを検証する>>
-3. <<logonFromIndexPage,index.phpページからウィッシャがログオンする>>
+1. <<_saving_the_wisher_s_id_in_the_session_upon_creation,ウィッシャの作成時に、セッションにウィッシャのIDを保存する>>
+2. <<_validating_user_logon,ウィッシュ・リストを編集しようとするユーザーがログインしていることを検証する>>
+3. <<_html_form_for_logon_on_index_php,index.phpページからウィッシャがログオンする>>
 
 現在のドキュメントは、PHP向けのNetBeans IDEでのCRUDアプリケーションの作成というPHPチュートリアルの一部です。
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == 前のレッスンからのアプリケーション・ソース・コード
 
 MySQLユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/files/documents/4/1930/lesson4.zip[+ここ+]をクリックします。
 
 Oracleデータベース・ユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+ここ+]をクリックします。
 
-
+[[_saving_the_wisher_s_id_in_the_session_upon_creation]]
 == 作成時にセッションにウィッシャのIDを保存
 
-link:http://us2.php.net/manual/en/ref.session.php[+セッション+]は、link:wish-list-lesson5.html#htmlForm[+HTML入力フォーム+]を使用せずに、あるページから別のページへ情報を転送する持続的記憶域です。この機能は、事前定義されたPHP配列 ``$_SESSION`` によってサポートされています。
+link:http://us2.php.net/manual/en/ref.session.php[+セッション+]は、link:wish-list-lesson5.html#_html_form_for_logon_on_index_php[+HTML入力フォーム+]を使用せずに、あるページから別のページへ情報を転送する持続的記憶域です。この機能は、事前定義されたPHP配列 `$_SESSION` によってサポートされています。
 
-セキュリティのために、新しいウィッシャが作成されたら、フォームに入力せずに自動的にログオンする必要があります。そのため、 ``createNewWisher.php`` ファイルを変更して、次の機能を実装する必要があります。
+セキュリティのために、新しいウィッシャが作成されたら、フォームに入力せずに自動的にログオンする必要があります。そのため、 `createNewWisher.php` ファイルを変更して、次の機能を実装する必要があります。
 
 * データベースに新規ウィッシャを追加する。
 * セッションを開く。
 * ウィッシャの名前をセッションに保存する。
-* ウィッシャが ``editWishList.php`` ページにリダイレクトされたときに、セッションのウィッシャの名前を転送する。
+* ウィッシャが `editWishList.php` ページにリダイレクトされたときに、セッションのウィッシャの名前を転送する。
 
- ``createNewWisher.php`` ファイル内で、次の行を検索します。
+ `createNewWisher.php` ファイル内で、次の行を検索します。
 
 
-[source,java]
+[source,php]
 ----
 
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+WishDB::getInstance()->create_wisher($_POST['user'], $_POST['password']);
 ----
 
 そのすぐ下に、次のコード・ブロックを入力します。
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 $_SESSION['user'] = $_POST['user'];
 ----
 
-このコード・ブロックはセッションを開始し、これは、データを入力または取得するための ``$_SESSION`` 配列を開くことを意味します。その後、コードは ``$_SESSION`` 配列に要素を追加します。追加された要素には、値と識別子(キー)が含まれています。値は、新しく作成されたウィッシャの名前で、識別子は「user」です。その後、プログラムはウィッシャを ``editWishList.php`` ページにリダイレクトします。
+このコード・ブロックはセッションを開始し、これは、データを入力または取得するための `$_SESSION` 配列を開くことを意味します。その後、コードは `$_SESSION` 配列に要素を追加します。追加された要素には、値と識別子(キー)が含まれています。値は、新しく作成されたウィッシャの名前で、識別子は「user」です。その後、プログラムはウィッシャを `editWishList.php` ページにリダイレクトします。
 
-
+[[_validating_user_logon]]
 == ユーザー・ログオンの検証
 
-ユーザーが ``editWishList.php`` ページに到達すると、アプリケーションは、 ``createNewWisher.php`` ページで登録されたのと同じユーザーがページにアクセスしていることを確認する必要があります。
+ユーザーが `editWishList.php` ページに到達すると、アプリケーションは、 `createNewWisher.php` ページで登録されたのと同じユーザーがページにアクセスしていることを確認する必要があります。
 
 この機能の実装は、次の2つのステップで構成されます。
 
-* <<retrievingUserNameFromSession,セッションからのウィッシャの名前の取得>>
-* <<redirectingNotLoggedInUserToIndexPage,セッションからのウィッシャの名前の取得に失敗した場合にユーザーをindex.phpにリダイレクトする>>
+* <<_retrieving_the_wisher_s_name_from_the_session,セッションからのウィッシャの名前の取得>>
+* <<_logging_in_from_the_index_php_page,セッションからのウィッシャの名前の取得に失敗した場合にユーザーをindex.phpにリダイレクトする>>
 
-
+[[_retrieving_the_wisher_s_name_from_the_session]]
 === セッションからのウィッシャの名前の取得
 
- ``editWishList.php`` のPHPブロックのデフォルト・コードを次に置き換えます。
+ `editWishList.php` のPHPブロックのデフォルト・コードを次に置き換えます。
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 if (array_key_exists("user", $_SESSION)) {
-    echo "Hello " . $_SESSION['user'];
+  echo "Hello " . $_SESSION['user'];
 }
 ----
 
-このコード・ブロックは、データを取得するための ``$_SESSION`` 配列を開き、 ``$_SESSION`` に識別子「user」を持つ要素が含まれていることを確認します。確認が成功すると、コードは開始メッセージを出力します。
+このコード・ブロックは、データを取得するための `$_SESSION` 配列を開き、 `$_SESSION` に識別子「user」を持つ要素が含まれていることを確認します。確認が成功すると、コードは開始メッセージを出力します。
 
 セッションが正しく実装されていることを確認するには:
 
-1.  ``createNewWisher.php`` ファイルを実行し、Jackなどの新しいウィッシャを作成します。
- ``editWishList.php`` が開き、「Hello Jack」と表示されます。
-2. ブラウザのセッションCookieをクリアするか、またはセッションを終了して、IDEから ``editWishList.php`` を実行します。セッションを介して転送されたユーザーがいないため、
- ``editWishList.php`` ファイルが開き、「Hello」と表示されます。これは、未ログインおよび未登録のユーザーがウィッシュ・リストを作成したり編集できるようになるため、正しくありません。これを回避するには、ユーザーが ``index.php`` ページにリダイレクトされる必要があります。
+1.  `createNewWisher.php` ファイルを実行し、Jackなどの新しいウィッシャを作成します。
+ `editWishList.php` が開き、「Hello Jack」と表示されます。
+2. ブラウザのセッションCookieをクリアするか、またはセッションを終了して、IDEから `editWishList.php` を実行します。セッションを介して転送されたユーザーがいないため、
+ `editWishList.php` ファイルが開き、「Hello」と表示されます。これは、未ログインおよび未登録のユーザーがウィッシュ・リストを作成したり編集できるようになるため、正しくありません。これを回避するには、ユーザーが `index.php` ページにリダイレクトされる必要があります。
 
-
+[[_logging_in_from_the_index_php_page]]
 === ログインしていないユーザーのリダイレクト
 
-次のコード・ブロックを ``editWishList.php`` の ``if`` 節の下に追加します。
+次のコード・ブロックを `editWishList.php` の `if` 節の下に追加します。
 
-[source,java]
+[source,php]
 ----
 
 else {
-   header('Location: index.php');
-   exit;
+  header('Location: index.php');
+  exit;
 }
 ----
 
 このコードは、ユーザーをindex.phpページにリダイレクトし、PHPコードの実行を取り消します。
 
-機能が正しく実装されたことを確認するには、 ``editWishList.php`` ファイルを実行します。 ``index.php`` ページが開く場合は正常です。
+機能が正しく実装されたことを確認するには、 `editWishList.php` ファイルを実行します。 `index.php` ページが開く場合は正常です。
 
-
+[[_html_form_for_logon_on_index_php]]
 == index.phpページからのログイン
 
 index.phpページからのログオンは、次の2つのステップで構成されます。
 
-* <<logonForm,ユーザーの名前とパスワードをHTML入力フォームに入力し、検証のためにデータをindex.phpページに送信する>>
-* <<logonValidation,ログオンを検証する>>
+* <<_html_form_for_logon_on_index_php,ユーザーの名前とパスワードをHTML入力フォームに入力し、検証のためにデータをindex.phpページに送信する>>
+* <<_logon_validation,ログオンを検証する>>
 
-
+[[_html_form_for_logon_on_index_php]]
 === index.php上のログオン用のHTMLフォーム
 
- ``index.php`` ファイルで、次のコードを終了 ``</body>`` タグの前に入力します。
+ `index.php` ファイルで、次のコードを終了 `</body>` タグの前に入力します。
 
 [source,xml]
 ----
 
 <form name="logon" action="index.php" method="POST" >
-    Username: <input type="text" name="user">
-    Password  <input type="password" name="userpassword">
-    <input type="submit" value="Edit My Wish List">
+  Username: <input type="text" name="user">
+  Password  <input type="password" name="userpassword">
+  <input type="submit" value="Edit My Wish List">
 </form>
 ----
 
@@ -201,13 +181,13 @@
 
 ログオンの検証には、次が含まれます。
 
-* <<checkWhereUserCameFrom,ユーザーのリダイレクト元を確認する>>。
-* <<verifyCredentials,ユーザーの名前とパスワードを確認する>>。
-* ユーザー名をセッションに保存して、ユーザーをeditWishList.phpページにリダイレクトするか、または<<displayErrorMessage,エラー・メッセージを表示する>>。
+* <<_logon_validation,ユーザーのリダイレクト元を確認する>>。
+* <<_logon_validation,ユーザーの名前とパスワードを確認する>>。
+* ユーザー名をセッションに保存して、ユーザーをeditWishList.phpページにリダイレクトするか、または<<_logon_validation,エラー・メッセージを表示する>>。
 
-ユーザーは、アプリケーションの開始時、 ``editWishList.php`` ページから、または名前とパスワードの入力後に<<validateWisherLogon,index.php>>ページからリダイレクトされたときに、 ``index.php`` ページにアクセスすることがあります。
+ユーザーは、アプリケーションの開始時、 `editWishList.php` ページから、または名前とパスワードの入力後に<<_function_verify_wisher_credentials,index.php>>ページからリダイレクトされたときに、 `index.php` ページにアクセスすることがあります。
 
-最後のケースのみlink:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTMLリクエスト・メソッド+]のPOSTが使用されるため、ユーザーが ``index.php`` にアクセスしたときに、そのユーザーがどこにいたのかを常に確認することができます。
+最後のケースのみlink:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTMLリクエスト・メソッド+]のPOSTが使用されるため、ユーザーが `index.php` にアクセスしたときに、そのユーザーがどこにいたのかを常に確認することができます。
 
 index.phpファイルで、次のコードを使用して、<?php?>ブロックをHTMLブロックの上に作成します。
 
@@ -215,107 +195,115 @@
 ----
 
 <?php
-
 require_once("Includes/db.php");
-$logonSuccess = false;// verify user's credentials
+$logonSuccess = false;
+
+// verify user's credentials
 if ($_SERVER['REQUEST_METHOD'] == "POST") {
     $logonSuccess = (WishDB::getInstance()->verify_wisher_credentials($_POST['user'], $_POST['userpassword']));
     if ($logonSuccess == true) {
-        session_start();
-        $_SESSION['user'] = $_POST['user'];
-        header('Location: editWishList.php');
-        exit;
+      session_start();
+      $_SESSION['user'] = $_POST['user'];
+      header('Location: editWishList.php');
+      exit;
     }
 }
 ?>
-
 ----
 
-コード・ブロックの先頭では、 ``db.php`` ファイルを使用可能にし、 ``$logonSuccess`` 変数を値 ``false`` で初期化します。検証に成功すると、この値は ``true`` に変更されます。
+コード・ブロックの先頭では、 `db.php` ファイルを使用可能にし、 `$logonSuccess` 変数を値 `false` で初期化します。検証に成功すると、この値は `true` に変更されます。
 
-ユーザーの資格を確認するコードは、最初に、リクエスト・メソッドがPOSTかどうかを確認します。リクエスト・メソッドがPOSTの場合、ユーザーは<<logonForm,ログオン・フォーム>>を送信した後にリダイレクトされます。この場合、コード・ブロックはログオン・フォームに入力された名前とパスワードを使用して ``verify_wisher_credentials`` 関数をコールします。
+ユーザーの資格を確認するコードは、最初に、リクエスト・メソッドがPOSTかどうかを確認します。リクエスト・メソッドがPOSTの場合、ユーザーは<<_html_form_for_logon_on_index_php,ログオン・フォーム>>を送信した後にリダイレクトされます。この場合、コード・ブロックはログオン・フォームに入力された名前とパスワードを使用して `verify_wisher_credentials` 関数をコールします。
 
-<<verifyWisherCredentials,次の項>>で記述する ``verify_wisher_credentials`` 関数は、<<logonForm,ログオン・フォーム>>内で送信された値とユーザーおよびパスワードが一致するレコードが、 ``wishers`` 表にあるかどうかを確認します。 ``verify_wisher_credentials`` 関数が ``true`` を返す場合、指定された名前とパスワードの組合せを持つウィッシャがデータベースに登録されます。これは、検証が成功し、 ``$logonSuccess`` の値が ``true`` に変更されることを意味します。この場合、セッションが開始し、 ``$_SESSION`` 配列が開きます。コードは ``$_SESSION`` 配列に新しい要素を追加します。この要素には、値と識別子(キー)が含まれています。値はウィッシャの名前で、識別子は「user」です。次に、ウィッシュ・リストを編集するために、コードはユーザーを ``editWishList.php`` ページにリダイレクトします。
+<<_function_verify_wisher_credentials,次の項>>で記述する `verify_wisher_credentials` 関数は、<<_html_form_for_logon_on_index_php,ログオン・フォーム>>内で送信された値とユーザーおよびパスワードが一致するレコードが、 `wishers` 表にあるかどうかを確認します。 `verify_wisher_credentials` 関数が `true` を返す場合、指定された名前とパスワードの組合せを持つウィッシャがデータベースに登録されます。これは、検証が成功し、 `$logonSuccess` の値が `true` に変更されることを意味します。この場合、セッションが開始し、 `$_SESSION` 配列が開きます。コードは `$_SESSION` 配列に新しい要素を追加します。この要素には、値と識別子(キー)が含まれています。値はウィッシャの名前で、識別子は「user」です。次に、ウィッシュ・リストを編集するために、コードはユーザーを `editWishList.php` ページにリダイレクトします。
 
- ``verify_wisher_credentials`` 関数が ``false`` を返す場合、 ``$logonSuccess`` 変数の値はfalseのままです。変数の値は、<<displayErrorMessage,エラー・メッセージの表示>>で使用されます。
+ `verify_wisher_credentials` 関数が `false` を返す場合、 `$logonSuccess` 変数の値はfalseのままです。変数の値は、<<_displaying_error_messages,エラー・メッセージの表示>>で使用されます。
 
-
+[[_function_verify_wisher_credentials]]
 === 関数verify_wisher_credentials
 
-ウィッシャの資格の確認を実装するには、 ``db.php`` ファイルの ``WishDB`` クラスに新しい関数を追加する必要があります。この関数は、入力パラメータとして名前とパスワードを必要とし、0または1を返します。
+ウィッシャの資格の確認を実装するには、 `db.php` ファイルの `WishDB` クラスに新しい関数を追加する必要があります。この関数は、入力パラメータとして名前とパスワードを必要とし、0または1を返します。
 
 *MySQLデータベースの場合*、次のコード・ブロックを入力します。
 
-[source,java]
-----
-
-public function verify_wisher_credentials ($name, $password){$name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$result = $this->query("SELECT 1 FROM wishers
- 	           WHERE name = '" . $name . "' AND password = '" . $password . "'");
-   return $result->data_seek(0);
-}
-----
-
-*Oracleデータベースの場合*、次のコード・ブロックを入力します(OCI8には ``mysql_num_rows`` と同等のものが存在しないため、このコードは ``get_wisher_id_by_name`` の変更された形式です)。
-
-
-[source,java]
+[source,php]
 ----
 
 public function verify_wisher_credentials($name, $password) {
-    $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':name_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
-//Because name is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);
-    if ($row) 
-        return true;
-    else
-        return false;
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+  $result = $this->query("SELECT 1 FROM wishers WHERE name = '"
+                  . $name . "' AND password = '" . $password . "'");
+  return $result->data_seek(0);
 }
 ----
 
-このコード・ブロックは、問合せ `` "SELECT 1 FROM wishers WHERE Name = '" . $name . "'AND Password = '" . $password . "'"`` を実行し、指定した問合せに一致するレコードの数を返します。そのようなレコードが見つかった場合、関数は ``true`` を返します。そのようなレコードがデータベースに存在しない場合、関数は ``false`` を返します。
+*Oracleデータベースの場合*、次のコード・ブロックを入力します(OCI8には `mysql_num_rows` と同等のものが存在しないため、このコードは `get_wisher_id_by_name` の変更された形式です)。
 
 
+[source,php]
+----
+
+public function verify_wisher_credentials($name, $password) {
+  $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
+  $stid = oci_parse($this->con, $query);
+  oci_bind_by_name($stid, ':name_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+//Because name is a unique value I only expect one row
+  $row = oci_fetch_array($stid, OCI_ASSOC);
+  if ($row)
+    return true;
+  else
+    return false;
+}
+----
+
+このコード・ブロックは、問合せ ` "SELECT 1 FROM wishers WHERE Name = '" . $name . "'AND Password = '" . $password . "'"` を実行し、指定した問合せに一致するレコードの数を返します。そのようなレコードが見つかった場合、関数は `true` を返します。そのようなレコードがデータベースに存在しない場合、関数は `false` を返します。
+
+[[_displaying_error_messages]]
 === エラー・メッセージの表示
 
-アプリケーションがエラー・メッセージを表示できるようにするには、次の<? >コード・ブロックを、 ``index.php`` のログオン・フォームの入力フィールドより下で、ボタンより上に入力します。
+アプリケーションがエラー・メッセージを表示できるようにするには、次の<? >コード・ブロックを、 `index.php` のログオン・フォームの入力フィールドより下で、ボタンより上に入力します。
 
 [source,php]
 ----
 
 <?php
-  if ($_SERVER["REQUEST_METHOD"] == "POST") { 
-      if (!$logonSuccess)
-          echo "Invalid name and/or password";
-  }
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
+  if (!$logonSuccess)
+    echo "Invalid name and/or password";
+}
 ?>
 ----
+
 このコード・ブロックは$logonSuccess変数の値を確認し、falseの場合はエラー・メッセージを表示します。
 
-
+[[_testing_the_logon_from_the_index_php_page]]
 == index.phpページからのログオンのテスト
 
- ``index.php`` の最初のページでログオン機能が正しく動作することを確認するには:
+ `index.php` の最初のページでログオン機能が正しく動作することを確認するには:
 
 1. アプリケーションを実行します。
-2.  ``index.php`` ページで、「Username」編集ボックスに「Tom」と入力し、「Password」編集ボックスに「Tim」と入力します。
+2.  `index.php` ページで、「Username」編集ボックスに「Tom」と入力し、「Password」編集ボックスに「Tim」と入力します。
 3. 「Edit My Wish List」をクリックします。エラー・メッセージが表示されます(下のブラウザ・ウィンドウは幅が600pxに縮小されているため、改行がいくつか追加されています)。
+
 image::images/incorrectNamePasswordIndex.png[]
+
 4. 「Username」編集ボックスに「Tom」と入力し、「Password」編集ボックスに「tomcat」と入力します。
 5. 「Edit My Wish List」をクリックします。editWishList.phpページが表示されます。
+
 image::images/SuccessfulLogonOnIndexRedirectToEditWishList.png[]
 
-
+[[application_source_code_after_the_current_lesson_is_completed]]
 == 現在のレッスン完了後のアプリケーション・ソース・コード
 
 MySQLユーザー: このレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+ここ+]をクリックします。
 
 Oracleデータベース・ユーザー: このレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+ここ+]をクリックします。
 
-
+[[_next_steps]]
 == 次の手順
 
 link:wish-list-lesson4.html[+<< 前のレッスン+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_pt_BR.asciidoc
index 94a053e..c3aa193 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_pt_BR.asciidoc
@@ -41,154 +41,131 @@
 :description: Lição 5: Adicionando Segurança. Implementando o Log-in do Usuário da Aplicação - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lição 5: Adicionando Segurança. Implementando o Log-in do Usuário da Aplicação
 
-
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário da Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. 
-*=> Adicionando Segurança. Implementando o Log-in de Usuário a Aplicação*
-
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
 Nesta lição, você implementará a funcionalidade de log-in para um wisher. Isso afeta os seguintes arquivos:
 
-*  ``index.php`` 
-*  ``createnewwisher.php`` 
-*  ``editWishlist.php`` 
-*  ``db.php`` 
+*  `index.php` 
+*  `createnewwisher.php` 
+*  `editWishlist.php` 
+*  `db.php` 
 
 Implementar a funcionalidade de log-in consiste nas seguintes etapas:
 
-1. <<savingWisherIDInSessionUponCreation,Salvar o wisher ID na Sessão em criação de um wisher>>
-2. <<validateWisherLogon,Validar se o usuário que tenta editar um desejo está conectado>>
-3. <<logonFromIndexPage,Fazer log-in do wisher na página index.php>>
+1. <<_saving_the_wisher_s_id_in_the_session_upon_creation,Salvar o wisher ID na Sessão em criação de um wisher>>
+2. <<_validating_user_logon,Validar se o usuário que tenta editar um desejo está conectado>>
+3. <<_html_form_for_logon_on_index_php,Fazer log-in do wisher na página index.php>>
 
 O documento atual é uma parte do tutorial Criando uma Aplicação CRUD no NetBeans IDE para PHP.
 
-
-
+[[_application_source_code_from_the_previous_lesson]]
 == Código-fonte da Aplicação da Lição Anterior
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1930/lesson4.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior estiver concluída.
 
 Usuários do banco de dados Oracle: clique link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior for concluída.
 
-
+[[_saving_the_wisher_s_id_in_the_session_upon_creation]]
 == Salvando o wisher ID na Sessão Em Criação
 
-Uma link:http://us2.php.net/manual/en/ref.session.php[+Sessão+] é um armazenamento duradouro para transferir informações de uma página para outra sem usar um link:wish-list-lesson5.html#htmlForm[+form de entrada HTML+]. Essa funcionalidade tem suporte por meio de um array PHP predefinido  ``$_SESSION`` .
+Uma link:http://us2.php.net/manual/en/ref.session.php[+Sessão+] é um armazenamento duradouro para transferir informações de uma página para outra sem usar um link:wish-list-lesson5.html#htmlForm[+form de entrada HTML+]. Essa funcionalidade tem suporte por meio de um array PHP predefinido  `$_SESSION` .
 
-Por motivos de segurança, depois que um novo wisher é criado, ele deve se conectar automaticamente sem preencher um form. Portanto, você precisa modificar o arquivo  ``createNewWisher.php``  para implementar a seguinte funcionalidade:
+Por motivos de segurança, depois que um novo wisher é criado, ele deve se conectar automaticamente sem preencher um form. Portanto, você precisa modificar o arquivo  `createNewWisher.php`  para implementar a seguinte funcionalidade:
 
 * Adicione um novo wisher ao banco de dados.
 * Abra uma sessão.
 * Armazene o nome do wisher na sessão.
-* Transfira o nome do wisher na sessão quando ele for redirecionado para a página  ``editWishList.php`` .
+* Transfira o nome do wisher na sessão quando ele for redirecionado para a página  `editWishList.php` .
 
-No arquivo  ``createNewWisher.php`` , localize a linha:
+No arquivo  `createNewWisher.php` , localize a linha:
 
 
-[source,java]
+[source,php]
 ----
 
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+WishDB::getInstance()->create_wisher($_POST['user'], $_POST['password']);
 ----
 
 e insira o seguinte bloco de código abaixo:
 
-
-[source,java]
+[source,php]
 ----
 
 session_start();
 $_SESSION['user'] = $_POST['user'];
 ----
 
-O bloco de código inicia uma sessão, o que significa abrir o array  ``$_SESSION``  para inserir ou recuperar dados. Em seguida, o código adiciona um elemento ao array  ``$_SESSION`` . O elemento adicionado contém um valor e um identificador (chave). O valor é o nome dos wishers recém-criados e o identificador é "user". Em seguida, o programa redireciona o wisher para a página  ``editWishList.php`` .
+O bloco de código inicia uma sessão, o que significa abrir o array  `$_SESSION`  para inserir ou recuperar dados. Em seguida, o código adiciona um elemento ao array  `$_SESSION` . O elemento adicionado contém um valor e um identificador (chave). O valor é o nome dos wishers recém-criados e o identificador é "user". Em seguida, o programa redireciona o wisher para a página  `editWishList.php` .
 
-
+[[_validating_user_logon]]
 == Validando o Log-in do Usuário
 
-Quando um usuário chega à página  ``editWishList.php`` , a aplicação deve confirmar que a página foi acessada pela mesma pessoa que acabou de se registrar na página  ``createNewWisher.php`` .
+Quando um usuário chega à página  `editWishList.php` , a aplicação deve confirmar que a página foi acessada pela mesma pessoa que acabou de se registrar na página  `createNewWisher.php` .
 
 Implementar essa funcionalidade consiste em duas etapas:
 
-* <<retrievingUserNameFromSession,Recuperando o nome do wisher na Sessão>>
-* <<redirectingNotLoggedInUserToIndexPage,Redirecionar o usuário para o index.php, caso a recuperação do nome do wisher na sessão tenha falhado>>
+* <<_retrieving_the_wisher_s_name_from_the_session,Recuperando o nome do wisher na Sessão>>
+* <<_logging_in_from_the_index_php_page,Redirecionar o usuário para o index.php, caso a recuperação do nome do wisher na sessão tenha falhado>>
 
-
+[[_retrieving_the_wisher_s_name_from_the_session]]
 === Recuperando o Nome do Wisher da Sessão
 
-Substitua o código default no bloco PHP de  ``editWishList.php``  pelo seguinte:
+Substitua o código default no bloco PHP de  `editWishList.php`  pelo seguinte:
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 if (array_key_exists("user", $_SESSION)) {
-    echo "Hello " . $_SESSION['user'];
+  echo "Hello " . $_SESSION['user'];
 }
 ----
 
-O bloco de código abre o array  ``$_SESSION``  para recuperar dados e verifica se  ``$_SESSION``  contém um elemento com o identificador "user". Se a verificação for bem-sucedida, o código imprime uma mensagem de boas-vindas.
+O bloco de código abre o array  `$_SESSION`  para recuperar dados e verifica se  `$_SESSION`  contém um elemento com o identificador "user". Se a verificação for bem-sucedida, o código imprime uma mensagem de boas-vindas.
 
 Para verificar se a sessão foi implementada corretamente:
 
-1. Execute o arquivo  ``createNewWisher.php``  e crie um novo wisher, por exemplo, Jack.
-O  ``editWishList.php``  abre com "Hello Jack" (Olá, Jack).
-2. Limpe os cookies da sessão em seu browser ou termine a sessão e execute  ``editWishList.php``  no IDE.
-O arquivo  ``editWishList.php``  abre com Hello porque nenhum usuário foi transferido a uma sessão. Isso não é correto, porque permite que alguém que não esteja conectado e não esteja registrado crie ou edite uma lista de desejos. Para evitar isso, o usuário precisa ser redirecionado para a página  ``index.php`` .
+1. Execute o arquivo  `createNewWisher.php`  e crie um novo wisher, por exemplo, Jack.
+O  `editWishList.php`  abre com "Hello Jack" (Olá, Jack).
+2. Limpe os cookies da sessão em seu browser ou termine a sessão e execute  `editWishList.php`  no IDE.
+O arquivo  `editWishList.php`  abre com Hello porque nenhum usuário foi transferido a uma sessão. Isso não é correto, porque permite que alguém que não esteja conectado e não esteja registrado crie ou edite uma lista de desejos. Para evitar isso, o usuário precisa ser redirecionado para a página  `index.php` .
 
-
+[[_logging_in_from_the_index_php_page]]
 === Redirecionando um Usuário Que Não Está Conectado
 
-Adicione o bloco de código seguinte ao  ``editWishList.php`` , abaixo da cláusula  ``if`` :
+Adicione o bloco de código seguinte ao  `editWishList.php` , abaixo da cláusula  `if` :
 
-[source,java]
+[source,php]
 ----
 
 else {
-   header('Location: index.php');
-   exit;
+  header('Location: index.php');
+  exit;
 }
 ----
 
 O código redireciona o usuário para a página index.php e cancela a execução do código PHP.
 
-Para verificar se a funcionalidade foi implementada corretamente, execute o arquivo  ``editWishList.php`` . O resultado esperado é que a página  ``index.php``  abra.
+Para verificar se a funcionalidade foi implementada corretamente, execute o arquivo  `editWishList.php` . O resultado esperado é que a página  `index.php`  abra.
 
-
+[[_html_form_for_logon_on_index_php]]
 == Fazendo log-in na página index.php
 
 O log-in na página index.php consiste em duas etapas:
 
-* <<logonForm,Indicando o nome e a senha do usuário em um form de entrada HTML e enviando os dados para validação à página index.php.>>
-* <<logonValidation,Validando o log-in>>
+* <<_html_form_for_logon_on_index_php,Indicando o nome e a senha do usuário em um form de entrada HTML e enviando os dados para validação à página index.php.>>
+* <<_logon_validation,Validando o log-in>>
 
-
+[[_html_form_for_logon_on_index_php]]
 === Form HTML para Log-in em index.php
 
-No arquivo  ``index.php`` , insira o código a seguir antes de fechar a tag  ``</body>`` :
+No arquivo  `index.php` , insira o código a seguir antes de fechar a tag  `</body>` :
 
 [source,xml]
 ----
 
 <form name="logon" action="index.php" method="POST" >
-    Username: <input type="text" name="user">
-    Password  <input type="password" name="userpassword">
-    <input type="submit" value="Edit My Wish List">
+  Username: <input type="text" name="user">
+  Password  <input type="password" name="userpassword">
+  <input type="submit" value="Edit My Wish List">
 </form>
 ----
 
@@ -196,18 +173,18 @@
 
 O código apresenta um link:wish-list-lesson3.html#htmlForm[+form HTML+] que permite inserir o nome e a senha do usuário nos campos de texto. Quando o usuário clica em Editar Minha Lista de Desejos, os dados são transferidos para a mesma página, index.php.
 
-
+[[_logon_validation]]
 === Validação de Log-in
 
 A validação do log-in envolve:
 
-* <<checkWhereUserCameFrom,Verificação de onde o usuário foi redirecionado>>.
-* <<verifyCredentials,Verificação do nome e senha do usuário>>.
-* Salvar o nome do usuário na Sessão e redirecionar o usuário para a página editWishList.php ou <<displayErrorMessage,Exibir uma mensagem de erro.>>
+* <<_logon_validation,Verificação de onde o usuário foi redirecionado>>.
+* <<_logon_validation,Verificação do nome e senha do usuário>>.
+* Salvar o nome do usuário na Sessão e redirecionar o usuário para a página editWishList.php ou <<_logon_validation,Exibir uma mensagem de erro.>>
 
-Um usuário pode acessar a página  ``index.php``  ao iniciar a aplicação, ou na página<<validateWisherLogon, editWishList.php>>, ou quando redirecionado da página  ``index.php``  depois de inserir o nome e a senha.
+Um usuário pode acessar a página  `index.php`  ao iniciar a aplicação, ou na página<<_function_verify_wisher_credentials, editWishList.php>>, ou quando redirecionado da página  `index.php`  depois de inserir o nome e a senha.
 
-Como o link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+método de solicitação HTML+] POST é usado somente em último caso, você sempre pode saber onde o usuário estava localizado quando acessou o  ``index.php`` .
+Como o link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+método de solicitação HTML+] POST é usado somente em último caso, você sempre pode saber onde o usuário estava localizado quando acessou o  `index.php` .
 
 No arquivo index.php, crie um bloco <?php ?> acima do bloco HTML, com o seguinte código:
 
@@ -215,107 +192,115 @@
 ----
 
 <?php
-
 require_once("Includes/db.php");
-$logonSuccess = false;// verify user's credentials
+$logonSuccess = false;
+
+// verify user's credentials
 if ($_SERVER['REQUEST_METHOD'] == "POST") {
     $logonSuccess = (WishDB::getInstance()->verify_wisher_credentials($_POST['user'], $_POST['userpassword']));
     if ($logonSuccess == true) {
-        session_start();
-        $_SESSION['user'] = $_POST['user'];
-        header('Location: editWishList.php');
-        exit;
+      session_start();
+      $_SESSION['user'] = $_POST['user'];
+      header('Location: editWishList.php');
+      exit;
     }
 }
 ?>
-
 ----
 
-O início do código permite que o usuário use o arquivo  ``db.php``  e inicialize a variável  ``$log-inSuccess``  com o valor  ``false`` . Se a validação ocorrer, esse valor mudará para  ``true`` .
+O início do código permite que o usuário use o arquivo  `db.php`  e inicialize a variável  `$log-inSuccess`  com o valor  `false` . Se a validação ocorrer, esse valor mudará para  `true` .
 
-O código que verifica as credenciais do usuário verifica primeiro se o método de solicitação é POST. Se o método for POST, o usuário foi redirecionado depois de enviar o <<logonForm,form de log-in>>. Nesse caso, o bloco de código chama a função  ``verify_wisher_credentials``  com o nome e a senha inseridas no form de log-in.
+O código que verifica as credenciais do usuário verifica primeiro se o método de solicitação é POST. Se o método for POST, o usuário foi redirecionado depois de enviar o <<_html_form_for_logon_on_index_php,form de log-in>>. Nesse caso, o bloco de código chama a função  `verify_wisher_credentials`  com o nome e a senha inseridas no form de log-in.
 
-A função  ``verify_wisher_credentials`` , que você escreverá <<verifyWisherCredentials,na próxima seção>>, verifica se há um registro na tabela de  ``wishers``  em que o usuário e a senha são confrontados com os valores enviados no <<logonForm,form de log-in>>. Se a função  ``verify_wisher_credentials``  retornar  ``true`` , um wisher com a combinação de nome e senha será registrado no banco de dados. Isso significa que a validação ocorreu e que  ``$log-inSuccess``  muda o valor para  ``true`` . Nesse caso, a seção é iniciada e o array  ``$_SESSION``  abre. O código adiciona um novo elemento ao array  ``$_SESSION`` . O elemento contém um valor e um identificador (chave). O valor é o nome do wisher e o identificador é "user". Em seguida, o código redireciona o usuário para a página  ``editWishList.php``  para editar a lista de desejos.
+A função  `verify_wisher_credentials` , que você escreverá <<_function_verify_wisher_credentials,na próxima seção>>, verifica se há um registro na tabela de  `wishers`  em que o usuário e a senha são confrontados com os valores enviados no <<verify_wisher_credentials,form de log-in>>. Se a função  `verify_wisher_credentials`  retornar  `true` , um wisher com a combinação de nome e senha será registrado no banco de dados. Isso significa que a validação ocorreu e que  `$log-inSuccess`  muda o valor para  `true` . Nesse caso, a seção é iniciada e o array  `$_SESSION`  abre. O código adiciona um novo elemento ao array  `$_SESSION` . O elemento contém um valor e um identificador (chave). O valor é o nome do wisher e o identificador é "user". Em seguida, o código redireciona o usuário para a página  `editWishList.php`  para editar a lista de desejos.
 
-Se a função  ``verify_wisher_credentials``  retornar  ``false`` , o valor da variável  ``$log-inSuccess``  permanece falso. O valor da variável é usado em <<displayErrorMessage,exibindo uma mensagem de erro>>.
+Se a função  `verify_wisher_credentials`  retornar  `false` , o valor da variável  `$log-inSuccess`  permanece falso. O valor da variável é usado em <<_displaying_error_messages,exibindo uma mensagem de erro>>.
 
-
+[[_function_verify_wisher_credentials]]
 === Função verify_wisher_credentials
 
-Para implementar a verificação das credenciais do wisher, você precisa adicionar uma nova função à classe  ``WishDB``  no arquivo  ``db.php`` . A função requer um nome e uma senha como parâmetros de entrada e retorna 0 ou 1.
+Para implementar a verificação das credenciais do wisher, você precisa adicionar uma nova função à classe  `WishDB`  no arquivo  `db.php` . A função requer um nome e uma senha como parâmetros de entrada e retorna 0 ou 1.
 
 *Para o banco de dados MySQL*, insira o seguinte bloco de código:
 
-[source,java]
-----
-
-public function verify_wisher_credentials ($name, $password){$name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$result = $this->query("SELECT 1 FROM wishers
- 	           WHERE name = '" . $name . "' AND password = '" . $password . "'");
-   return $result->data_seek(0);
-}
-----
-
-*Para o banco de dados Oracle*, insira o seguinte bloco de código (como o OCI8 não tem equivalente para  ``mysql_num_rows`` , este código é uma forma modificada de  ``get_wisher_id_by_name`` ):
-
-
-[source,java]
+[source,php]
 ----
 
 public function verify_wisher_credentials($name, $password) {
-    $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':name_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
-//Because name is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);
-    if ($row) 
-        return true;
-    else
-        return false;
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+  $result = $this->query("SELECT 1 FROM wishers WHERE name = '"
+                  . $name . "' AND password = '" . $password . "'");
+  return $result->data_seek(0);
 }
 ----
 
-O bloco de código executa a consulta  `` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '". $password. "'"``  e retorna o número de registros que atendam à consulta especificada. Se o registro for encontrado, a função retorna  ``true`` . Se não houver registro no banco de dados, a função retornará  ``false`` .
+*Para o banco de dados Oracle*, insira o seguinte bloco de código (como o OCI8 não tem equivalente para  `mysql_num_rows` , este código é uma forma modificada de  `get_wisher_id_by_name` ):
 
 
+[source,php]
+----
+
+public function verify_wisher_credentials($name, $password) {
+  $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
+  $stid = oci_parse($this->con, $query);
+  oci_bind_by_name($stid, ':name_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+//Because name is a unique value I only expect one row
+  $row = oci_fetch_array($stid, OCI_ASSOC);
+  if ($row)
+    return true;
+  else
+    return false;
+}
+----
+
+O bloco de código executa a consulta  ` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '". $password. "'"`  e retorna o número de registros que atendam à consulta especificada. Se o registro for encontrado, a função retorna  `true` . Se não houver registro no banco de dados, a função retornará  `false` .
+
+[[_displaying_error_messages]]
 === Exibindo Mensagens de Erro
 
-Para permitir que a aplicação exiba mensagens de erro, insira o seguinte bloco de código <? php?> no form de log-in em  ``index.php`` , abaixo dos campos de entrada, mas acima do botão:
+Para permitir que a aplicação exiba mensagens de erro, insira o seguinte bloco de código <? php?> no form de log-in em  `index.php` , abaixo dos campos de entrada, mas acima do botão:
 
 [source,php]
 ----
 
 <?php
-  if ($_SERVER["REQUEST_METHOD"] == "POST") { 
-      if (!$logonSuccess)
-          echo "Invalid name and/or password";
-  }
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
+  if (!$logonSuccess)
+    echo "Invalid name and/or password";
+}
 ?>
 ----
+
 O bloco de código verifica o valor da variável $log-inSuccess e se ele for falso, exibe uma mensagem de erro.
 
-
+[[_testing_the_logon_from_the_index_php_page]]
 == Testando o Log-in na Página index.php
 
-Para verificar se a funcionalidade de log-in funciona corretamente na página inicial  ``index.php`` :
+Para verificar se a funcionalidade de log-in funciona corretamente na página inicial  `index.php` :
 
 1. Execute a aplicação.
-2. Na página  ``index.php`` , digite Tom na caixa de edição Nome do Usuário e Tim na caixa de edição Senha.
+2. Na página  `index.php` , digite Tom na caixa de edição Nome do Usuário e Tim na caixa de edição Senha.
 3. Pressione Editar Minha Lista de Desejos. É exibida uma mensagem de erro (observe que a janela de browser abaixo é reduzida para 600 px de largura, o que acrescenta algumas quebras de linha): 
+
 image::images/incorrectNamePasswordIndex.png[]
+
 4. Digite Tom na caixa de edição Nome de Usuário e tomcat na caixa de edição Senha.
 5. Clique em Editar Minha Lista de Desejos. É exibida a página editWishList.php: 
+
 image::images/SuccessfulLogonOnIndexRedirectToEditWishList.png[]
 
-
+[[application_source_code_after_the_current_lesson_is_completed]]
 == O código-fonte da Aplicação após a Lição Atual está Concluído
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição estiver concluída.
 
 Usuários do banco de dados Oracle: clique link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição for concluída.
 
-
+[[_next_steps]]
 == Próximas Etapas
 
 link:wish-list-lesson4.html[+<< Lição anterior+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ru.asciidoc
index e6c7b90..1bf80fa 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_ru.asciidoc
@@ -41,154 +41,132 @@
 :description: Урок 5: добавление функций безопасности Реализация входа пользователя в приложения - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Урок 5: добавление функций безопасности Реализация входа пользователя в приложения
 
-
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. 
-*=> Добавление функций безопасности. Реализация входа пользователя в приложение*
-
-7. link:wish-list-lesson6.html[+Добавление к базе данных новых желаний+]
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В этом уроке рассматривается реализация функциональных возможностей входа в приложение для пользователя. Эти функции применимы к следующим файлам:
 
-*  ``index.php`` 
-*  ``createNewWisher.php`` 
-*  ``editWishlist.php`` 
-*  ``db.php`` 
+*  `index.php` 
+*  `createNewWisher.php` 
+*  `editWishlist.php` 
+*  `db.php` 
 
 Реализация функции входа в систему состоит из следующих действий:
 
-1. <<savingWisherIDInSessionUponCreation,Сохранение идентификатора пользователя в сеансе после создания пользователя>>
-2. <<validateWisherLogon,Проверка того, что пользователь, предпринимающий попытки редактирования списка "Wish list", зарегистрирован в системе.>>
-3. <<logonFromIndexPage,Регистрация пользователя на странице index.php >>
+1. <<_saving_the_wisher_s_id_in_the_session_upon_creation,Сохранение идентификатора пользователя в сеансе после создания пользователя>>
+2. <<_validating_user_logon,Проверка того, что пользователь, предпринимающий попытки редактирования списка "Wish list", зарегистрирован в системе.>>
+3. <<_html_form_for_logon_on_index_php,Регистрация пользователя на странице index.php >>
 
 Текущий документ является частью краткого учебного курса "Создание приложения CRUD в IDE NetBeans для PHP".
 
-
-
+[[_application_source_code_from_the_previous_lesson]]
 == Исходный код приложения из предыдущего урока
 
 Для пользователей MySQL: перейдите по link:https://netbeans.org/files/documents/4/1930/lesson4.zip[+этой ссылке+] для загрузки исходного кода, описывающего состояние проекта на момент завершения предыдущего урока.
 
 Для пользователей баз данных Oracle: перейдите по link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+этой+] для загрузки исходного кода, описывающего состояние проекта на момент завершения предыдущего урока.
 
-
+[[_saving_the_wisher_s_id_in_the_session_upon_creation]]
 == Сохранение идентификатора пользователя в сеансе после создания пользователя
 
-link:http://us2.php.net/manual/en/ref.session.php[+Session+] ("Сеанс") является хранилищем состояния для передачи информации с одной страницы на другую без использования link:wish-list-lesson5.html#htmlForm[+формы ввода HTML+]. Данная функция поддерживается посредством предопределенного массива PHР  ``$_SESSION`` .
+link:http://us2.php.net/manual/en/ref.session.php[+Session+] ("Сеанс") является хранилищем состояния для передачи информации с одной страницы на другую без использования link:wish-list-lesson5.html#htmlForm[+формы ввода HTML+]. Данная функция поддерживается посредством предопределенного массива PHР  `$_SESSION` .
 
-В целях безопасности новый пользователь после создания должен быть автоматически зарегистрирован без заполнения формы. Поэтому необходимо изменить файл  ``createNewWisher.php``  для реализации следующих функциональных возможностей:
+В целях безопасности новый пользователь после создания должен быть автоматически зарегистрирован без заполнения формы. Поэтому необходимо изменить файл  `createNewWisher.php`  для реализации следующих функциональных возможностей:
 
 * Добавление нового пользователя в базу данных.
 * Открытие сеанса.
 * Сохранение имени пользователя в сеансе
-* Передача имени пользователя в сеансе при переадресации пользователя на страницу  ``editWishList.php`` .
+* Передача имени пользователя в сеансе при переадресации пользователя на страницу  `editWishList.php` .
 
-В файл  ``createNewWisher.php``  включите следующую строку:
+В файл  `createNewWisher.php`  включите следующую строку:
 
 
-[source,java]
+[source,php]
 ----
 
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+WishDB::getInstance()->create_wisher($_POST['user'], $_POST['password']);
 ----
 
 а далее введите следующий блок кода:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 $_SESSION['user'] = $_POST['user'];
 ----
 
-Блок кода начинает сеанс, что означает открытие массива  ``$_SESSION``  для ввода или извлечения данных. Затем код добавляет элемент к массиву  ``$_SESSION`` . Добавляемый элемент содержит значение и идентификатор. Значение – это имя недавно созданных пользователей, а "user" является идентификатором. Затем программа переадресует пользователя на страницу  ``editWishList.php`` .
+Блок кода начинает сеанс, что означает открытие массива  `$_SESSION`  для ввода или извлечения данных. Затем код добавляет элемент к массиву  `$_SESSION` . Добавляемый элемент содержит значение и идентификатор. Значение – это имя недавно созданных пользователей, а "user" является идентификатором. Затем программа переадресует пользователя на страницу  `editWishList.php` .
 
-
+[[_validating_user_logon]]
 == Проверка допустимости входа для пользователя
 
-При переходе пользователя на страницу  ``editWishList.php``  приложение должно выдавать подтверждение того, что страница используется лицом, только что зарегистрированным на странице  ``createNewWisher.php`` .
+При переходе пользователя на страницу  `editWishList.php`  приложение должно выдавать подтверждение того, что страница используется лицом, только что зарегистрированным на странице  `createNewWisher.php` .
 
 Реализация этих функциональных возможностей состоит из двух действий:
 
-* <<retrievingUserNameFromSession,Извлечение имени пользователя из сеанса>>
-* <<redirectingNotLoggedInUserToIndexPage,Переадресация пользователя на страницу index.php, в случае если имя пользователя не было извлечено из сеанса>>
+* <<_retrieving_the_wisher_s_name_from_the_session,Извлечение имени пользователя из сеанса>>
+* <<_logging_in_from_the_index_php_page,Переадресация пользователя на страницу index.php, в случае если имя пользователя не было извлечено из сеанса>>
 
-
+[[_retrieving_the_wisher_s_name_from_the_session]]
 === Извлечение имени пользователя из сеанса
 
-Замените код, содержащийся в блоке PHP по умолчанию,  ``editWishList.php``  следующим кодом:
+Замените код, содержащийся в блоке PHP по умолчанию,  `editWishList.php`  следующим кодом:
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 if (array_key_exists("user", $_SESSION)) {
-    echo "Hello " . $_SESSION['user'];
+  echo "Hello " . $_SESSION['user'];
 }
 ----
 
-Блок кода открывает массив  ``$_SESSION``  для извлечения данных и проверки того, что в  ``$_SESSION``  содержится элемент с идентификатором "user". Если проверка выполнена успешно, код выводит на экран приветственное сообщение.
+Блок кода открывает массив  `$_SESSION`  для извлечения данных и проверки того, что в  `$_SESSION`  содержится элемент с идентификатором "user". Если проверка выполнена успешно, код выводит на экран приветственное сообщение.
 
 Для проверки правильности реализации сеанса выполните следующие действия:
 
-1. Запустите файл  ``createNewWisher.php``  и создайте нового пользователя, например, с именем "Jack".
-Откроется файл  ``editWishList.php``  с приветственным сообщением "Hello Jack".
-2. Можно либо очистить файл cookie сеанса в используемом браузере, либо завершить сеанс и запустить файл  ``editWishList.php``  в среде IDE.
-Откроется файл  ``editWishList.php`` , содержащий текст "Hello", поскольку в рамках сеанса не были переданы какие-либо данные пользователя. Это нежелательный вариант, так как в данном случае незарегистрированный или не выполнивший вход в систему пользователь может создавать или редактировать список "Wish list". Во избежание этого следует выполнить переадресацию пользователя на страницу  ``index.php`` .
+1. Запустите файл  `createNewWisher.php`  и создайте нового пользователя, например, с именем "Jack".
+Откроется файл  `editWishList.php`  с приветственным сообщением "Hello Jack".
+2. Можно либо очистить файл cookie сеанса в используемом браузере, либо завершить сеанс и запустить файл  `editWishList.php`  в среде IDE.
+Откроется файл  `editWishList.php` , содержащий текст "Hello", поскольку в рамках сеанса не были переданы какие-либо данные пользователя. Это нежелательный вариант, так как в данном случае незарегистрированный или не выполнивший вход в систему пользователь может создавать или редактировать список "Wish list". Во избежание этого следует выполнить переадресацию пользователя на страницу  `index.php` .
 
-
+[[_logging_in_from_the_index_php_page]]
 === Переадресация пользователя, не зарегистрированного в системе
 
-Разместите следующий блок кода в файле  ``editWishList.php``  под выражением  ``if`` :
+Разместите следующий блок кода в файле  `editWishList.php`  под выражением  `if` :
 
-[source,java]
+[source,php]
 ----
 
 else {
-   header('Location: index.php');
-   exit;
+  header('Location: index.php');
+  exit;
 }
 ----
 
 В соответствии с кодом осуществляется переадресация пользователя на страницу index.php и прерывается выполнение кода PHP.
 
-Для проверки того, что функциональные возможности реализованы правильно, запустите файл  ``editWishList.php`` . Ожидаемым результатом является открытие страницы  ``index.php`` .
+Для проверки того, что функциональные возможности реализованы правильно, запустите файл  `editWishList.php` . Ожидаемым результатом является открытие страницы  `index.php` .
 
-
+[[_html_form_for_logon_on_index_php]]
 == Регистрация на странице index.php
 
 Вход с использованием страницы index.php состоит из двух действий:
 
 * <<logonForm,Ввод имени пользователя и пароля в форму ввода HTML и передача данных на страницу index.php для проверки достоверности.>>
-* <<logonValidation,Проверка допустимости входа>>
+* <<_logon_validation,Проверка допустимости входа>>
 
-
+[[_html_form_for_logon_on_index_php]]
 === Форма HTML для входа на странице index.php
 
-В файле  ``index.php``  перед закрытием тега  ``</body>`` введите следующий код:
+В файле  `index.php`  перед закрытием тега  `</body>` введите следующий код:
 
 [source,xml]
 ----
 
 <form name="logon" action="index.php" method="POST" >
-    Username: <input type="text" name="user">
-    Password  <input type="password" name="userpassword">
-    <input type="submit" value="Edit My Wish List">
+  Username: <input type="text" name="user">
+  Password  <input type="password" name="userpassword">
+  <input type="submit" value="Edit My Wish List">
 </form>
 ----
 
@@ -196,18 +174,18 @@
 
 Код представляет собой link:wish-list-lesson3.html#htmlForm[+форму HTML+] которая позволяет вводить имя и пароль пользователя в текстовые поля. Если пользователь нажимает кнопку "Edit My Wish List", данные передаются на ту же страницу – index.php.
 
-
+[[_logon_validation]]
 === Проверка допустимости входа
 
 Проверка допустимости входа включает следующие действия:
 
-* <<checkWhereUserCameFrom,Проверка местоположения пользователя до переадресации>>.
-* <<verifyCredentials,Проверка имени пользователя и пароля>>.
-* Сохранение имени пользователя в сеансе и переадресация пользователя на страницу editWishList.php или <<displayErrorMessage,Отображение сообщения об ошибке.>>
+* <<_logon_validation,Проверка местоположения пользователя до переадресации>>.
+* <<_logon_validation,Проверка имени пользователя и пароля>>.
+* Сохранение имени пользователя в сеансе и переадресация пользователя на страницу editWishList.php или <<_logon_validation,Отображение сообщения об ошибке.>>
 
-Пользователь может выполнить доступ на страницу  ``index.php``  при запуске приложения, с помощью страницы <<validateWisherLogon, editWishList.php>> или при переадресации со страницы  ``index.php``  после ввода имени и пароля.
+Пользователь может выполнить доступ на страницу  `index.php`  при запуске приложения, с помощью страницы <<_function_verify_wisher_credentials, editWishList.php>> или при переадресации со страницы  `index.php`  после ввода имени и пароля.
 
-Поскольку только в последнем случае используется link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+метод запроса HTML+] POST, существует возможность узнать местонахождение пользователя, если он выполняет доступ к странице  ``index.php`` .
+Поскольку только в последнем случае используется link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+метод запроса HTML+] POST, существует возможность узнать местонахождение пользователя, если он выполняет доступ к странице  `index.php` .
 
 В файле index.php над блоком HTML создайте блок <? php? > со следующим кодом:
 
@@ -215,107 +193,115 @@
 ----
 
 <?php
-
 require_once("Includes/db.php");
-$logonSuccess = false;// verify user's credentials
+$logonSuccess = false;
+
+// verify user's credentials
 if ($_SERVER['REQUEST_METHOD'] == "POST") {
     $logonSuccess = (WishDB::getInstance()->verify_wisher_credentials($_POST['user'], $_POST['userpassword']));
     if ($logonSuccess == true) {
-        session_start();
-        $_SESSION['user'] = $_POST['user'];
-        header('Location: editWishList.php');
-        exit;
+      session_start();
+      $_SESSION['user'] = $_POST['user'];
+      header('Location: editWishList.php');
+      exit;
     }
 }
 ?>
-
 ----
 
-Верхняя часть этого блока кода разрешает использование файла  ``db.php``  и инициализирует переменную  ``$logonSuccess``  со значением  ``false`` . В случае успешной проверки это значение сменится на  ``true`` .
+Верхняя часть этого блока кода разрешает использование файла  `db.php`  и инициализирует переменную  `$logonSuccess`  со значением  `false` . В случае успешной проверки это значение сменится на  `true` .
 
-Код, проверяющий учетные данные пользователя, сперва проверяет, является ли методом запроса POST. Если POST является методом запроса, то пользователь был перенаправлен после подачи <<logonForm,формы входа>>. В таком случае блок кода вызывает функцию  ``verify_wisher_credentials`` , используя имя и пароль, введенные в форме входа.
+Код, проверяющий учетные данные пользователя, сперва проверяет, является ли методом запроса POST. Если POST является методом запроса, то пользователь был перенаправлен после подачи <<_html_form_for_logon_on_index_php,формы входа>>. В таком случае блок кода вызывает функцию  `verify_wisher_credentials` , используя имя и пароль, введенные в форме входа.
 
-Функция  ``verify_wisher_credentials`` , которую мы напишем в <<verifyWisherCredentials,следующем разделе>>, проверяет есть ли запись в таблице  ``пользователей`` , где имя пользователя и пароль совпадают со значениями, поданными в <<logonForm,форме входа>>. Если функция  ``verify_wisher_credentials``  возвращает  ``true`` , то в базе данных есть пользователь с указанной комбинацией имени и пароля. Это значит, что проверка успешна и значение  ``$logonSuccess``  меняется на  ``true`` . В таком случае начинается сеанс и открывается массив  ``$_SESSION`` . Код добавляет новый элемент к массиву  ``$_SESSION`` . Этот элемент содержит значение и идентификатор (ключ). Значение является именем пользователя, а идентификатором является "user". Затем код перенаправляет пользователя к странице  ``editWishList.php``  для редактирования списка желаний.
+Функция  `verify_wisher_credentials` , которую мы напишем в <<_function_verify_wisher_credentials,следующем разделе>>, проверяет есть ли запись в таблице  `пользователей` , где имя пользователя и пароль совпадают со значениями, поданными в <<_html_form_for_logon_on_index_php,форме входа>>. Если функция  `verify_wisher_credentials`  возвращает  `true` , то в базе данных есть пользователь с указанной комбинацией имени и пароля. Это значит, что проверка успешна и значение  `$logonSuccess`  меняется на  `true` . В таком случае начинается сеанс и открывается массив  `$_SESSION` . Код добавляет новый элемент к массиву  `$_SESSION` . Этот элемент содержит значение и идентификатор (ключ). Значение является именем пользователя, а идентификатором является "user". Затем код перенаправляет пользователя к странице  `editWishList.php`  для редактирования списка желаний.
 
-Если функция  ``verify_wisher_credentials``  возвращает  ``false`` , то значением переменной  ``$logonSuccess``  останется false. Значение переменной используется для <<displayErrorMessage,отображения сообщения об ошибке>>.
+Если функция  `verify_wisher_credentials`  возвращает  `false` , то значением переменной  `$logonSuccess`  останется false. Значение переменной используется для <<displayErrorMessage,отображения сообщения об ошибке>>.
 
-
+[[_function_verify_wisher_credentials]]
 === Функция verify_wisher_credentials
 
-Для проверки учетных данных пользователя необходимо добавить новую функцию к классу  ``WishDB``  в файле  ``db.php`` . Входными параметрами для этой функции являются имя и пароль; функция возвращает значение 0 или 1.
+Для проверки учетных данных пользователя необходимо добавить новую функцию к классу  `WishDB`  в файле  `db.php` . Входными параметрами для этой функции являются имя и пароль; функция возвращает значение 0 или 1.
 
 *Для базы данных MySQL* введите следующий блок кода:
 
-[source,java]
-----
-
-public function verify_wisher_credentials ($name, $password){$name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$result = $this->query("SELECT 1 FROM wishers
- 	           WHERE name = '" . $name . "' AND password = '" . $password . "'");
-   return $result->data_seek(0);
-}
-----
-
-*Для базы данных Oracle* введите следующий блок кода (поскольку в OCI8 нет эквивалента для  ``mysql_num_rows`` , данный код является модифицированной формой  ``get_wisher_id_by_name`` ):
-
-
-[source,java]
+[source,php]
 ----
 
 public function verify_wisher_credentials($name, $password) {
-    $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':name_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
-//Because name is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);
-    if ($row) 
-        return true;
-    else
-        return false;
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+  $result = $this->query("SELECT 1 FROM wishers WHERE name = '"
+                  . $name . "' AND password = '" . $password . "'");
+  return $result->data_seek(0);
 }
 ----
 
-Блок кода выполняет запрос  `` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '" . $password . "'"``  и возвращает число записей, соответствующих указанному запросу. Если такая запись найдена, функция возвратит  ``true`` . Если такой записи в базе данных не найдено, функция возвратит  ``false`` .
+*Для базы данных Oracle* введите следующий блок кода (поскольку в OCI8 нет эквивалента для  `mysql_num_rows` , данный код является модифицированной формой  `get_wisher_id_by_name` ):
 
 
+[source,php]
+----
+
+public function verify_wisher_credentials($name, $password) {
+  $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
+  $stid = oci_parse($this->con, $query);
+  oci_bind_by_name($stid, ':name_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+//Because name is a unique value I only expect one row
+  $row = oci_fetch_array($stid, OCI_ASSOC);
+  if ($row)
+    return true;
+  else
+    return false;
+}
+----
+
+Блок кода выполняет запрос  ` "SELECT 1 FROM wishers WHERE Name = '" . $name . "' AND Password = '" . $password . "'"`  и возвращает число записей, соответствующих указанному запросу. Если такая запись найдена, функция возвратит  `true` . Если такой записи в базе данных не найдено, функция возвратит  `false` .
+
+[[_displaying_error_messages]]
 === Отображение сообщений об ошибках
 
-Для включения отображения сообщений об ошибках в приложении введите следующий блок кода <? php ? > в форму "logon" на странице  ``index.php``  после полей ввода, но над кнопкой:
+Для включения отображения сообщений об ошибках в приложении введите следующий блок кода <? php ? > в форму "logon" на странице  `index.php`  после полей ввода, но над кнопкой:
 
 [source,php]
 ----
 
 <?php
-  if ($_SERVER["REQUEST_METHOD"] == "POST") { 
-      if (!$logonSuccess)
-          echo "Invalid name and/or password";
-  }
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
+  if (!$logonSuccess)
+    echo "Invalid name and/or password";
+}
 ?>
 ----
+
 Блок кода проверяет значение переменной $logonSuccess, и если значение есть "false", на экран выводится сообщение об ошибке.
 
-
+[[_testing_the_logon_from_the_index_php_page]]
 == Тестирование входа с помощью страницы index.php
 
-Для проверки корректности работы функции входа на первой странице  ``index.php``  выполните следующие действия:
+Для проверки корректности работы функции входа на первой странице  `index.php`  выполните следующие действия:
 
 1. Запустите приложение.
-2. На странице  ``index.php``  введите "Tom" в поле "Username" и "Tim" в поле "Password".
+2. На странице  `index.php`  введите "Tom" в поле "Username" и "Tim" в поле "Password".
 3. Нажмите кнопку "Edit My Wish List". Отобразится сообщение об ошибке (обратите внимание, что ширина приведенного ниже окна браузера уменьшена до 600 пикселей, в результате чего добавляется несколько разрывов строк). 
+
 image::images/incorrectNamePasswordIndex.png[]
+
 4. Введите "Tom" в поле "Username" и "tomcat" в поле "Password".
 5. Нажмите кнопку Edit My Wish List ("Редактировать мой список желаний"). Отобразится страница editWishList.php: 
+
 image::images/SuccessfulLogonOnIndexRedirectToEditWishList.png[]
 
-
+[[application_source_code_after_the_current_lesson_is_completed]]
 == Исходный код приложения на момент завершения текущего урока
 
 Для пользователей MySQL: щелкните link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+здесь+] для загрузки исходного кода, отражающего состояние проекта по завершении данного урока.
 
 Для пользователей Oracle Database: щелкните link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+здесь+] для загрузки исходного кода, отражающего состояние проекта по завершении данного урока.
 
-
+[[_next_steps]]
 == Что дальше?
 
 link:wish-list-lesson4.html[+<<Предыдущий урок+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_zh_CN.asciidoc
index ce78ed8..cfe2f8e 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson5_zh_CN.asciidoc
@@ -42,153 +42,132 @@
 :keywords: Apache NetBeans, Tutorials, 第 5 课:添加安全功能。实现应用程序用户登录
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. 
-*=> 添加安全功能。实现应用程序用户登录*
-
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 在本课中,将为许愿者实现登录功能。这会影响以下文件:
 
-*  ``index.php`` 
-*  ``createNewWisher.php`` 
-*  ``editWishlist.php`` 
-*  ``db.php`` 
+*  `index.php` 
+*  `createNewWisher.php` 
+*  `editWishlist.php` 
+*  `db.php` 
 
 实现登录功能包括以下步骤:
 
-1. <<savingWisherIDInSessionUponCreation,在创建许愿者后,在会话中保存许愿者 ID>>
-2. <<validateWisherLogon,验证尝试编辑愿望列表的用户是否登录>>
-3. <<logonFromIndexPage,许愿者从 index.php 页中登录>>
+1. <<_saving_the_wisher_s_id_in_the_session_upon_creation,在创建许愿者后,在会话中保存许愿者 ID>>
+2. <<_validating_user_logon,验证尝试编辑愿望列表的用户是否登录>>
+3. <<_html_form_for_logon_on_index_php,许愿者从 index.php 页中登录>>
 
 当前文档是“在适用于 PHP 的 NetBeans IDE 中创建 CRUD 应用程序”教程的一部分。
 
-
-
+[[_application_source_code_from_the_previous_lesson]]
 == 来自上一课的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/files/documents/4/1930/lesson4.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
 
 Oracle 数据库用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson4.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
 
-
+[[_saving_the_wisher_s_id_in_the_session_upon_creation]]
 == 创建后在会话中保存许愿者 ID
 
-link:http://us2.php.net/manual/en/ref.session.php[+会话+]是持久性存储,可用于将信息从一个页面传输到另一个页面,而无需使用 link:wish-list-lesson5.html#htmlForm[+HTML 输入窗体+]。可通过预定义的 PHP 数组  ``$_SESSION``  支持该功能。
+link:http://us2.php.net/manual/en/ref.session.php[+会话+]是持久性存储,可用于将信息从一个页面传输到另一个页面,而无需使用 link:wish-list-lesson5.html#htmlForm[+HTML 输入窗体+]。可通过预定义的 PHP 数组  `$_SESSION`  支持该功能。
 
-为安全起见,在创建新的许愿者后,该许愿者将自动登录而无需填写窗体。因此,您需要修改  ``createNewWisher.php``  文件以实现以下功能:
+为安全起见,在创建新的许愿者后,该许愿者将自动登录而无需填写窗体。因此,您需要修改  `createNewWisher.php`  文件以实现以下功能:
 
 * 将新许愿者添加到数据库中。
 * 打开会话。
 * 在会话中存储许愿者的名字。
-* 在将许愿者重定向到  ``editWishList.php``  页时,传输会话中的许愿者名字。
+* 在将许愿者重定向到  `editWishList.php`  页时,传输会话中的许愿者名字。
 
-在  ``createNewWisher.php``  文件中,找到以下行:
+在  `createNewWisher.php`  文件中,找到以下行:
 
 
-[source,java]
+[source,php]
 ----
 
-WishDB::getInstance()->create_wisher($_POST["user"], $_POST["password"]);
+WishDB::getInstance()->create_wisher($_POST['user'], $_POST['password']);
 ----
 
 然后,在其下输入以下代码块:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 $_SESSION['user'] = $_POST['user'];
 ----
 
-该代码块启动一个会话,这意味着打开  ``$_SESSION``  数组以输入或检索数据。然后,该代码在  ``$_SESSION``  数组中添加一个元素。添加的元素包含一个值和标识符(键)。该值是新创建的许愿者名字,标识符是 "user"。然后,程序将许愿者重定向到  ``editWishList.php``  页。
+该代码块启动一个会话,这意味着打开  `$_SESSION`  数组以输入或检索数据。然后,该代码在  `$_SESSION`  数组中添加一个元素。添加的元素包含一个值和标识符(键)。该值是新创建的许愿者名字,标识符是 "user"。然后,程序将许愿者重定向到  `editWishList.php`  页。
 
-
+[[_validating_user_logon]]
 == 验证用户登录
 
-当用户访问  ``editWishList.php``  页时,应用程序应确认刚才在  ``createNewWisher.php``  页上注册的同一个人访问了该页。
+当用户访问  `editWishList.php`  页时,应用程序应确认刚才在  `createNewWisher.php`  页上注册的同一个人访问了该页。
 
 实现该功能包括两个步骤:
 
-* <<retrievingUserNameFromSession,从会话中检索许愿者的名字>>
-* <<redirectingNotLoggedInUserToIndexPage,如果从会话中检索许愿者名字失败,将用户重定向到 index.php>>
+* <<_retrieving_the_wisher_s_name_from_the_session,从会话中检索许愿者的名字>>
+* <<_logging_in_from_the_index_php_page,如果从会话中检索许愿者名字失败,将用户重定向到 index.php>>
 
-
+[[_retrieving_the_wisher_s_name_from_the_session]]
 === 从会话中检索许愿者的名字
 
-将  ``editWishList.php``  的 PHP 块中的默认代码替换为以下内容:
+将  `editWishList.php`  的 PHP 块中的默认代码替换为以下内容:
 
-[source,java]
+[source,php]
 ----
 
 session_start();
 if (array_key_exists("user", $_SESSION)) {
-    echo "Hello " . $_SESSION['user'];
+  echo "Hello " . $_SESSION['user'];
 }
 ----
 
-该代码块打开  ``$_SESSION``  数组以检索数据,并验证  ``$_SESSION``  是否包含具有 "user" 标识符的元素。如果检查成功,该代码将输出欢迎消息。
+该代码块打开  `$_SESSION`  数组以检索数据,并验证  `$_SESSION`  是否包含具有 "user" 标识符的元素。如果检查成功,该代码将输出欢迎消息。
 
 检查是否正确实现会话:
 
-1. 运行  ``createNewWisher.php``  文件,然后创建一个新的许愿者,例如,Jack。
- ``editWishList.php``  打开,并显示 Hello Jack。
-2. 在浏览器中清除会话 Cookie,或者结束会话并从 IDE 中运行  ``editWishList.php`` 。
- ``editWishList.php``  文件打开并显示 Hello,因为没有通过会话传输任何用户。这是不正确的,因为它允许未登录和未注册的人创建或编辑愿望列表。为了避免出现该问题,需要将用户重定向到  ``index.php``  页。
+1. 运行  `createNewWisher.php`  文件,然后创建一个新的许愿者,例如,Jack。
+ `editWishList.php`  打开,并显示 Hello Jack。
+2. 在浏览器中清除会话 Cookie,或者结束会话并从 IDE 中运行  `editWishList.php` 。
+ `editWishList.php`  文件打开并显示 Hello,因为没有通过会话传输任何用户。这是不正确的,因为它允许未登录和未注册的人创建或编辑愿望列表。为了避免出现该问题,需要将用户重定向到  `index.php`  页。
 
-
+[[_logging_in_from_the_index_php_page]]
 === 重定向未登录的用户
 
-将以下代码块添加到  ``editWishList.php``  中的  ``if``  子句之下:
+将以下代码块添加到  `editWishList.php`  中的  `if`  子句之下:
 
-[source,java]
+[source,php]
 ----
 
 else {
-   header('Location: index.php');
-   exit;
+  header('Location: index.php');
+  exit;
 }
 ----
 
 该代码将用户重定向到 index.php 页并取消 PHP 代码执行。
 
-要检查是否正确实现了该功能,请运行  ``editWishList.php``  文件。预期的结果是打开  ``index.php``  页。
+要检查是否正确实现了该功能,请运行  `editWishList.php`  文件。预期的结果是打开  `index.php`  页。
 
-
+[[_html_form_for_logon_on_index_php]]
 == 从 index.php 页中登录
 
 从 index.php 页中登录包括两个步骤:
 
-* <<logonForm,在 HTML 输入窗体中输入用户的名字和口令,并将用于验证的数据提交到 index.php 页。>>
-* <<logonValidation,验证登录>>
+* <<_html_form_for_logon_on_index_php,在 HTML 输入窗体中输入用户的名字和口令,并将用于验证的数据提交到 index.php 页。>>
+* <<_logon_validation,验证登录>>
 
-
+[[_html_form_for_logon_on_index_php]]
 === 用于在 index.php 上登录的 HTML 窗体
 
-在  ``index.php``  文件中,在结束  ``</body>``  标记前输入以下代码:
+在  `index.php`  文件中,在结束  `</body>`  标记前输入以下代码:
 
 [source,xml]
 ----
 
 <form name="logon" action="index.php" method="POST" >
-    Username: <input type="text" name="user">
-    Password  <input type="password" name="userpassword">
-    <input type="submit" value="Edit My Wish List">
+  Username: <input type="text" name="user">
+  Password  <input type="password" name="userpassword">
+  <input type="submit" value="Edit My Wish List">
 </form>
 ----
 
@@ -196,18 +175,18 @@
 
 该代码显示一个 link:wish-list-lesson3.html#htmlForm[+HTML 窗体+],用于在文本字段中输入用户的名字和口令。当用户单击 "Edit My Wish List" 时,数据将传输到同一页,即 index.php。
 
-
+[[_logon_validation]]
 === 登录验证
 
 登录验证包括:
 
-* <<checkWhereUserCameFrom,检查从中重定向用户的位置>>。
-* <<verifyCredentials,验证用户的名字和口令>>。
-* 将用户名保存到会话中并将用户重定向到 editWishList.php 页或<<displayErrorMessage,显示一条错误消息。>>
+* <<_logon_validation,检查从中重定向用户的位置>>。
+* <<_logon_validation,验证用户的名字和口令>>。
+* 将用户名保存到会话中并将用户重定向到 editWishList.php 页或<<_logon_validation,显示一条错误消息。>>
 
-用户可以在启动应用程序时访问  ``index.php``  页,从 <<validateWisherLogon,editWishList.php>> 页中进行访问,或者在输入名字和口令后从  ``index.php``  页中重定向时访问该页。
+用户可以在启动应用程序时访问  `index.php`  页,从 <<_function_verify_wisher_credentials,editWishList.php>> 页中进行访问,或者在输入名字和口令后从  `index.php`  页中重定向时访问该页。
 
-由于仅在最后一种情况下使用 link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTML 请求方法+] POST,因此,您始终可以了解用户访问  ``index.php``  时所在的位置。
+由于仅在最后一种情况下使用 link:http://www.htmlcodetutorial.com/forms/_FORM_METHOD.html[+HTML 请求方法+] POST,因此,您始终可以了解用户访问  `index.php`  时所在的位置。
 
 在 index.php 文件中,使用以下代码在 HTML 块上面创建一个 <?php ?> 块:
 
@@ -215,107 +194,115 @@
 ----
 
 <?php
-
 require_once("Includes/db.php");
-$logonSuccess = false;// verify user's credentials
+$logonSuccess = false;
+
+// verify user's credentials
 if ($_SERVER['REQUEST_METHOD'] == "POST") {
     $logonSuccess = (WishDB::getInstance()->verify_wisher_credentials($_POST['user'], $_POST['userpassword']));
     if ($logonSuccess == true) {
-        session_start();
-        $_SESSION['user'] = $_POST['user'];
-        header('Location: editWishList.php');
-        exit;
+      session_start();
+      $_SESSION['user'] = $_POST['user'];
+      header('Location: editWishList.php');
+      exit;
     }
 }
 ?>
-
 ----
 
-代码块顶部允许使用  ``db.php``  文件,并使用  ``false``  值初始化  ``$logonSuccess``  变量。如果验证成功,该值将变为  ``true`` 。
+代码块顶部允许使用  `db.php`  文件,并使用  `false`  值初始化  `$logonSuccess`  变量。如果验证成功,该值将变为  `true` 。
 
-验证用户凭证的代码先检查请求方法是否为 POST。如果请求方法是 POST,则在提交<<logonForm,登录窗体>>后重定向用户。在这种情况下,代码块使用在登录窗体中输入的名字和口令调用  ``verify_wisher_credentials``  函数。
+验证用户凭证的代码先检查请求方法是否为 POST。如果请求方法是 POST,则在提交<<_html_form_for_logon_on_index_php,登录窗体>>后重定向用户。在这种情况下,代码块使用在登录窗体中输入的名字和口令调用  `verify_wisher_credentials`  函数。
 
- ``verify_wisher_credentials``  函数(在<<verifyWisherCredentials,下一节>>中编写)检查  ``wishers``  表中是否存在用户和口令与<<logonForm,登录窗体>>中提交的值相匹配的记录。如果  ``verify_wisher_credentials``  函数返回  ``true`` ,则在数据库中注册一个具有指定名字和口令组合的许愿者。这表示验证成功,并且  ``$logonSuccess``  将值更改为  ``true`` 。在这种情况下,将启动一个会话并打开  ``$_SESSION``  数组。该代码在  ``$_SESSION``  数组中添加一个新元素。该元素包含一个值和标识符(键)。该值是许愿者的名字,标识符是 "user"。然后,该代码将用户重定向到  ``editWishList.php``  页以编辑愿望列表。
+ `verify_wisher_credentials`  函数(在<<_html_form_for_logon_on_index_php,下一节>>中编写)检查  `wishers`  表中是否存在用户和口令与<<_function_verify_wisher_credentials,登录窗体>>中提交的值相匹配的记录。如果  `verify_wisher_credentials`  函数返回  `true` ,则在数据库中注册一个具有指定名字和口令组合的许愿者。这表示验证成功,并且  `$logonSuccess`  将值更改为  `true` 。在这种情况下,将启动一个会话并打开  `$_SESSION`  数组。该代码在  `$_SESSION`  数组中添加一个新元素。该元素包含一个值和标识符(键)。该值是许愿者的名字,标识符是 "user"。然后,该代码将用户重定向到  `editWishList.php`  页以编辑愿望列表。
 
-如果  ``verify_wisher_credentials``  函数返回  ``false`` ,则  ``$logonSuccess``  变量值保持为 false。将使用该变量值<<displayErrorMessage,显示错误消息>>。
+如果  `verify_wisher_credentials`  函数返回  `false` ,则  `$logonSuccess`  变量值保持为 false。将使用该变量值<<_displaying_error_messages,显示错误消息>>。
 
-
+[[_function_verify_wisher_credentials]]
 === verify_wisher_credentials 函数
 
-要实现验证许愿者凭证的功能,您需要在  ``db.php``  文件的  ``WishDB``  类中添加一个新函数。该函数要求将名字和口令作为输入参数,并返回 0 或 1。
+要实现验证许愿者凭证的功能,您需要在  `db.php`  文件的  `WishDB`  类中添加一个新函数。该函数要求将名字和口令作为输入参数,并返回 0 或 1。
 
 *对于 MySQL 数据库*,请输入以下代码块:
 
-[source,java]
-----
-
-public function verify_wisher_credentials ($name, $password){$name = $this->real_escape_string($name);$password = $this->real_escape_string($password);$result = $this->query("SELECT 1 FROM wishers
- 	           WHERE name = '" . $name . "' AND password = '" . $password . "'");
-   return $result->data_seek(0);
-}
-----
-
-*对于 Oracle 数据库*,请输入以下代码块(由于 OCI8 没有等效的  ``mysql_num_rows`` ,该代码是  ``get_wisher_id_by_name``  的修改形式):
-
-
-[source,java]
+[source,php]
 ----
 
 public function verify_wisher_credentials($name, $password) {
-    $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
-    $stid = oci_parse($this->con, $query);
-    oci_bind_by_name($stid, ':name_bv', $name);
-    oci_bind_by_name($stid, ':pwd_bv', $password);
-    oci_execute($stid);
-//Because name is a unique value I only expect one row
-    $row = oci_fetch_array($stid, OCI_ASSOC);
-    if ($row) 
-        return true;
-    else
-        return false;
+  $name = $this->real_escape_string($name);
+  $password = $this->real_escape_string($password);
+  $result = $this->query("SELECT 1 FROM wishers WHERE name = '"
+                  . $name . "' AND password = '" . $password . "'");
+  return $result->data_seek(0);
 }
 ----
 
-该代码块执行查询  ``"SELECT 1 FROM wishers WHERE Name = '" . $name . "'AND Password = '" . $password . "'"``  并返回满足指定查询的记录数。如果找到此类记录,该函数将返回  ``true`` 。如果在数据库中找不到此类记录,该函数将返回  ``false`` 。
+*对于 Oracle 数据库*,请输入以下代码块(由于 OCI8 没有等效的  `mysql_num_rows` ,该代码是  `get_wisher_id_by_name`  的修改形式):
 
 
+[source,php]
+----
+
+public function verify_wisher_credentials($name, $password) {
+  $query = "SELECT 1 FROM wishers WHERE name = :name_bv AND password = :pwd_bv";
+  $stid = oci_parse($this->con, $query);
+  oci_bind_by_name($stid, ':name_bv', $name);
+  oci_bind_by_name($stid, ':pwd_bv', $password);
+  oci_execute($stid);
+
+//Because name is a unique value I only expect one row
+  $row = oci_fetch_array($stid, OCI_ASSOC);
+  if ($row)
+    return true;
+  else
+    return false;
+}
+----
+
+该代码块执行查询  `"SELECT 1 FROM wishers WHERE Name = '" . $name . "'AND Password = '" . $password . "'"`  并返回满足指定查询的记录数。如果找到此类记录,该函数将返回  `true` 。如果在数据库中找不到此类记录,该函数将返回  `false` 。
+
+[[_displaying_error_messages]]
 === 显示错误消息
 
-要允许应用程序显示错误消息,请输入以下 <? php ?> 代码块(在  ``index.php``  的登录窗体中的输入字段之下、按钮之上):
+要允许应用程序显示错误消息,请输入以下 <? php ?> 代码块(在  `index.php`  的登录窗体中的输入字段之下、按钮之上):
 
 [source,php]
 ----
 
 <?php
-  if ($_SERVER["REQUEST_METHOD"] == "POST") { 
-      if (!$logonSuccess)
-          echo "Invalid name and/or password";
-  }
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
+  if (!$logonSuccess)
+    echo "Invalid name and/or password";
+}
 ?>
 ----
+
 该代码块检查 $logonSuccess 变量值;如果该值为 false,则显示一条错误消息。
 
-
+[[_testing_the_logon_from_the_index_php_page]]
 == 测试从 index.php 页中登录
 
-检查登录功能在主页  ``index.php``  上是否正常工作:
+检查登录功能在主页  `index.php`  上是否正常工作:
 
 1. 运行应用程序。
-2. 在  ``index.php``  页上,在 "Username" 编辑框中输入 Tom,在 "Password" 编辑框中输入 Tim。
+2. 在  `index.php`  页上,在 "Username" 编辑框中输入 Tom,在 "Password" 编辑框中输入 Tim。
 3. 按 "Edit My Wish List"。将显示一条错误消息(请注意,下面的浏览器窗口宽度减小为 600px,其中添加了一些换行符): 
+
 image::images/incorrectNamePasswordIndex.png[]
+
 4. 在 "Username" 编辑框中输入 Tom,在 "Password" 编辑框中输入 tomcat。
 5. 按 "Edit My Wish list"。将显示 editWishList.php 页: 
+
 image::images/SuccessfulLogonOnIndexRedirectToEditWishList.png[]
 
-
+[[application_source_code_after_the_current_lesson_is_completed]]
 == 完成当前课程后的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+此处+]以下载源代码,该代码反映了在完成课程后的项目状态。
 
 Oracle 数据库用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+此处+]以下载源代码,该代码反映了在完成课程后的项目状态。
 
-
+[[_next_steps]]
 == 后续步骤
 
 link:wish-list-lesson4.html[+<< 上一课+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6.asciidoc
index d5e02bf..598dde4 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6.asciidoc
@@ -41,72 +41,38 @@
 :keywords: Apache NetBeans, Tutorials, Lesson 6: Adding a New Wish to the Database
 
 
-Tutorial contents:
-
-1. link:wish-list-tutorial-main-page.html[+Creating a Database Driven Application With PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. link:wish-list-oracle-lesson1.html[+Creating Oracle Database Tables+]
-3. 
-link:wish-list-lesson2.html[+Designing the Application. Reading from the Database+]
-
-4. link:wish-list-lesson3.html[+Creating a New Application User +]
-5. link:wish-list-lesson4.html[+Optimizing the Code+]
-6. link:wish-list-lesson5.html[+Adding Security. Implementing Application User Logon+]
-7. 
-*=> Adding a New Wish to the Database*
-
-* <<previousLessonSourceCode,Application Source Code from the Previous Lesson>>
-* <<addNewWish,Submitting a New Wish>>
-* <<add-wish-ui-elements,Adding the User Interface Components>>
-* <<inputFormAfterunsuccessfulSave,Redisplaying the Due Date after an Unsuccessful Submission>>
-* <<logonVerification,Verifying the Wisher's Logon>>
-* <<insert-new-wish,Inserting the New Wish to the Database>>
-* <<add-insert-wish,Adding the insert_wish Function to WishDB>>
-* <<add-format-date-for-sql,Adding the format_date_for_sql Function to WishDB>>
-* <<validateAndEnterWishToDatabase,Entering the New Wish Record in the Database>>
-* <<displayingErrorMessages,Displaying Error Messages>>
-* <<backToIndex,Returning to the Front index.php Page>>
-* <<testingAddWishFunctionality,Testing the Add Wish Functionality>>
-* <<lessonResultSourceCode,Application Source Code after the Current Lesson Is Completed>>
-8. link:wish-list-lesson7.html[+Updating and Deleting Entries in the Database+]
-9. link:wish-list-lesson8.html[+Making the Application Look Better Using the CSS Technology+]
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
 In this lesson you expand the application functionality with two features:
 
-* <<addNewWish,Adding a new wish>>
-* <<backToIndex,Returning to the front index.php page>>
+* <<_submitting_a_new_wish,Adding a new wish>>
+* <<_returning_to_the_front_index_php_page,Returning to the front index.php page>>
 
-To implement this functionality, you edit the  ``editWishList.php``  file and create the new file  ``editWish.php`` .
+To implement this functionality, you edit the  `editWishList.php`  file and create the new file  `editWish.php` .
 
 image::images/page-flow-diagram-l6.png[]
 
 The current document is a part of the link:wish-list-tutorial-main-page.html[+Creating a CRUD Application in the NetBeans IDE for PHP+] tutorial.
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == Application Source Code from the Previous Lesson
 
-MySQL users: Click link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+ here+] to download the source code that reflects the project state after the previous lesson is completed.
+MySQL users: Click link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+ here+] to download the source code that reflects the project state after the previous lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-
+[[_submitting_a_new_wish]]
 == Submitting a New Wish
 
 The user submits a new wish in the following steps:
 
-1. The user logs in, switches to the  ``editWishList.php``  page, and presses the Add Wish button. The  ``editWish.php``  page opens, displaying an HTML form.
+1. The user logs in, switches to the  `editWishList.php`  page, and presses the Add Wish button. The  `editWish.php`  page opens, displaying an HTML form.
 2. In the HTML form, the user enters a description of a wish and possibly the date by when he/she wants it and presses the Save Changes button.
 3. If a form is submitted without a description of the wish, the user is returned to the form to try again. If the user submitted a due date but no description, that date is redisplayed when the form reloads.
 
 To enable this procedure for the user, you add the following functionality to the application:
 
-* <<add-wish-ui-elements,User interface components>>, consisting of an HTML form for adding wishes and a button in  ``editWishList.php `` that redirects the user to the form.
-* Code for <<inputFormAfterunsuccessfulSave,redisplaying the due date>> if an incomplete form is submitted.
+* <<add-wish-ui-elements,User interface components>>, consisting of an HTML form for adding wishes and a button in  `editWishList.php ` that redirects the user to the form.
+* Code for <<_redisplaying_the_due_date_after_an_unsuccessful_submission,redisplaying the due date>> if an incomplete form is submitted.
 
 
 [[add-wish-ui-elements]]
@@ -114,7 +80,7 @@
 
 *To add functionality for adding a new wish:*
 
-1. Implement the Add Wish button. In the  ``editWishList.php``  file, add the following HTML code beneath the PHP block:
+1. Implement the Add Wish button. In the  `editWishList.php`  file, add the following HTML code beneath the PHP block:
 
 [source,xml]
 ----
@@ -122,8 +88,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
     <head>
-
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
         <form name="addNewWish" action="editWish.php">            
@@ -133,11 +98,11 @@
 </html>
 ----
 
-*Note: *You can ignore warnings from the HTML validator.
+*Note:* You can ignore warnings from the HTML validator.
 
-The form contains an "Add Wish" input field of the  ``submit``  type. This field implements the "Add Wish" button. When the user clicks Add Wish, they are redirected to the  ``editWish.php``  page. Because no data is transferred through this form, no Server Request method is used.
+The form contains an "Add Wish" input field of the  `submit`  type. This field implements the "Add Wish" button. When the user clicks Add Wish, they are redirected to the  `editWish.php`  page. Because no data is transferred through this form, no Server Request method is used.
 
-2. Add a table above the addNewWish form that displays the existing wishes for the wisher. The code is similar to  ``wishlist.php`` .
+2. Add a table above the addNewWish form that displays the existing wishes for the wisher. The code is similar to  `wishlist.php` .
 
 *For the MySQL database*:
 
@@ -145,7 +110,20 @@
 [source,php]
 ----
 
-<table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row['description']) . "</td>";echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";}?></table>
+<table border="black">
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
+    <?php
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+        echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+</table>
 ----
 
 *For the Oracle database:*
@@ -155,18 +133,22 @@
 ----
 
 <table border="black">
-    <tr><th>Item</th><th>Due Date</th></tr>
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
     <?php
-    require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
-    while ($row = oci_fetch_array($stid)) {echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
+    while ($row = oci_fetch_array($stid)) {
+        echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";
+        echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
     }
+    oci_free_statement($stid);
     ?>
 </table>
 ----
-3. Create the  ``editWish.php``  PHP file in the Source Files folder.
-4. In  ``editWish.php`` , implement the Add Wish form. Type or paste the following code below the <? php ?> block:
+3. Create the  `editWish.php`  PHP file in the Source Files folder.
+4. In  `editWish.php` , implement the Add Wish form. Type or paste the following code below the <? php ?> block:
 
 [source,xml]
 ----
@@ -176,10 +158,14 @@
 <html>
     <head>
 
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
-        <form name="editWish" action="editWish.php" method="POST">Describe your wish: <input type="text" name="wish"  value="" /><br/>When do you want to get it? <input type="text" name="dueDate" value=""/><br/><input type="submit" name="saveWish" value="Save Changes"/><input type="submit" name="back" value="Back to the List"/>
+        <form name="editWish" action="editWish.php" method="POST">
+            Describe your wish: <input type="text" name="wish"  value="" /><br/>
+            When do you want to get it? <input type="text" name="dueDate" value=""/><br/>
+            <input type="submit" name="saveWish" value="Save Changes"/>
+            <input type="submit" name="back" value="Back to the List"/>
         </form>
     </body>
 </html> 
@@ -189,39 +175,44 @@
 
 * Two empty text fields for entering the wish description and due date.
 * The texts to be printed next to the input fields.
-* A  ``submit``  field that represents a Save Changes button
-* A  ``submit``  field that represents a Back to the List button for returning to the  ``editWishList.php``  page
+* A  `submit`  field that represents a Save Changes button
+* A  `submit`  field that represents a Back to the List button for returning to the  `editWishList.php`  page
 
-Upon pressing the Add Wish button, the form submits the entered data to the same page,  ``editWish.php`` , through the Request method POST.
+Upon pressing the Add Wish button, the form submits the entered data to the same page,  `editWish.php` , through the Request method POST.
 
-
+[[_redisplaying_the_due_date_after_an_unsuccessful_submission]]
 === Redisplaying the Due Date After an Unsuccessful Submission
 
-If the user does not fill in a description in the Add Wish form, an error message is displayed and the user returns to the  ``editWish.php``  page. When the user returns to  ``editWish.php`` , the Add Wish form should show the value of  ``dueDate``  if it was entered. In the current implementation of the form, both fields are always empty. To keep entered values, you need to save the data of the new wish in an array. The array will consist of two elements named  ``description``  and  ``due_date`` . You then need to change the Add Wish form so it retrieves the value of the  ``dueDate``  field from the array.
+If the user does not fill in a description in the Add Wish form, an error message is displayed and the user returns to the  `editWish.php`  page. When the user returns to  `editWish.php` , the Add Wish form should show the value of  `dueDate`  if it was entered. In the current implementation of the form, both fields are always empty. To keep entered values, you need to save the data of the new wish in an array. The array will consist of two elements named  `description`  and  `due_date` . You then need to change the Add Wish form so it retrieves the value of the  `dueDate`  field from the array.
 
-*Note: *The code that reloads the input form if no description is entered is included in the <<validateAndEnterWishToDatabase,code that validates the data and enters it to the database>>. This code is not described in this section. The code in this section only preserves the value of  ``dueDate``  so that it is displayed if the form is reloaded .
+*Note:* The code that reloads the input form if no description is entered is included in the <<_verifying_the_wisher_s_logon,code that validates the data and enters it to the database>>. This code is not described in this section. The code in this section only preserves the value of  `dueDate`  so that it is displayed if the form is reloaded .
 
 *To redisplay the input form after the user submits it unsuccessfully:*
 
-1. Type or paste the following code block inside the HTML <body> element of  ``editWish.php`` , directly above the input form:
+1. Type or paste the following code block inside the HTML <body> element of  `editWish.php` , directly above the input form:
 
 [source,php]
 ----
 
-<?php 
-if ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("description" => $_POST["wish"], "due_date" => $_POST["dueDate"]);else$wish = array("description" => "", "due_date" => "");
-?>  
+<?php
+if ($_SERVER['REQUEST_METHOD'] == "POST")
+    $wish = array("description" => $_POST['wish'],
+                        "due_date" => $_POST['dueDate']);
+else
+    $wish = array("description" => "",
+                        "due_date" => "");
+?>
 ----
 
-The code checks which Request Server method was used for transferring the data and creates an array named $wish. If the method is POST, which means that the input form is displayed after an unsuccessful attempt to save a wish with an empty description, the elements  ``description``  and  ``due_date``  accept the values transferred through POST.
+The code checks which Request Server method was used for transferring the data and creates an array named $wish. If the method is POST, which means that the input form is displayed after an unsuccessful attempt to save a wish with an empty description, the elements  `description`  and  `due_date`  accept the values transferred through POST.
 
-If the method is not POST, which means that the input form is displayed for the first time after redirection form the  ``editWishList.php``  page, the elements  ``description``  and  ``due_date``  are empty.
+If the method is not POST, which means that the input form is displayed for the first time after redirection form the  `editWishList.php`  page, the elements  `description`  and  `due_date`  are empty.
 
-NOTE: In either case the description is empty. The difference is only in the  ``dueDate`` .
+NOTE: In either case the description is empty. The difference is only in the  `dueDate` .
 
-2. Update the Add Wish form so that the values of its input fields are retrieved from the  ``$wish``  array. Replace the lines in the Add Wish form:
+2. Update the Add Wish form so that the values of its input fields are retrieved from the  `$wish`  array. Replace the lines in the Add Wish form:
 
-[source,java]
+[source,php]
 ----
 
 Describe your wish: <input type="text" name="wish"  value="" /><br/>
@@ -236,13 +227,13 @@
 When do you want to get it? <input type="text" name="dueDate" value="<?php echo $wish['due_date']; ?>"/><br/>
 ----
 
-
+[[_verifying_the_wisher_s_logon]]
 == Verifying the Wisher's Logon
 
-In the  ``editWish.php``  file, enter the following session handling code inside the <? php ?> block at the top of the file:
+In the  `editWish.php`  file, enter the following session handling code inside the <? php ?> block at the top of the file:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -266,10 +257,10 @@
 
 After the user submits a new wish, the application needs to add the wish to the "wishes" database. To enable this functionality, add the following code to the application:
 
-* Add two more auxiliary functions to the  ``WishDB``  class in  ``db.php`` .
+* Add two more auxiliary functions to the  `WishDB`  class in  `db.php` .
 * One function adds a new record to the wishes table.
 * The other function converts dates into the format that the MySQL databases server supports.
-* Add code to  ``editWish.php``  that will use the new auxilliary functions in  ``WishDB``  to enter the new wish into the database.
+* Add code to  `editWish.php`  that will use the new auxilliary functions in  `WishDB`  to enter the new wish into the database.
 
 
 [[add-insert-wish]]
@@ -277,33 +268,40 @@
 
 This function requires the wisher's id, a description of the new wish, and the due date of the wish as the input parameters and enters this data to the database in a new record. The function does not return any values.
 
-Open  ``db.php ``  and add the function  ``insert_wish``  into the  ``WishDB `` class:
+Open  `db.php `  and add the function  `insert_wish`  into the  `WishDB ` class:
 
 *For the MySQL database*
 
 
-[source,java]
+[source,php]
 ----
 
-function insert_wish($wisherID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($this->format_date_for_sql($duedate)==null){$this->query("INSERT INTO wishes (wisher_id, description)" ." VALUES (" . $wisherID . ", '" . $description . "')");} else$this->query("INSERT INTO wishes (wisher_id, description, due_date)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ")");
+function insert_wish($wisherID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($this->format_date_for_sql($duedate)==null){
+       $this->query("INSERT INTO wishes (wisher_id, description)" .
+            " VALUES (" . $wisherID . ", '" . $description . "')");
+    } else
+        $this->query("INSERT INTO wishes (wisher_id, description, due_date)" .
+            " VALUES (" . $wisherID . ", '" . $description . "', "
+            . $this->format_date_for_sql($duedate) . ")");
 }
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 function insert_wish($wisherID, $description, $duedate) {
-  $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))"; 
-  $stid = oci_parse($this->con, $query);
-  oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
-  oci_bind_by_name($stid, ':desc_bv', $description);
-  oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
-  oci_execute($stid);
-  oci_free_statement($stid);
+    $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))";
+    $stid = oci_parse($this->con, $query);
+    oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
+    oci_bind_by_name($stid, ':desc_bv', $description);
+    oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
+    oci_execute($stid);
+    oci_free_statement($stid);
 }
 ----
 
@@ -313,90 +311,96 @@
 [[add-format-date-for-sql]]
 === Adding the format_date_for_sql Function to WishDB
 
-Add the function  ``format_date_for_sql``  to the  ``WishDB``  class in  ``db.php`` . The function requires a string with a date as the input parameter. The function returns a date in the format that can be processed by the database server or  ``null``  if the input string is empty.
+Add the function  `format_date_for_sql`  to the  `WishDB`  class in  `db.php` . The function requires a string with a date as the input parameter. The function returns a date in the format that can be processed by the database server or  `null`  if the input string is empty.
 
-NOTE: The function in this example uses the PHP  ``date_parse``  function. This function works only with English-language dates, such as December 25, 2010, and only Arabic numerals. A professional web site would use a date picker.
+NOTE: The function in this example uses the PHP  `date_parse`  function. This function works only with English-language dates, such as December 25, 2010, and only Arabic numerals. A professional web site would use a date picker.
 
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){if ($date == "")return null;else {$dateParts = date_parse($date);return $dateParts["year"]*10000 + $dateParts["month"]*100 + $dateParts["day"];}}
+function format_date_for_sql($date) {
+    if ($date == "")
+        return null;
+    else {
+        $dateParts = date_parse($date);
+        return $dateParts["year"] * 10000 + $dateParts["month"] * 100 + $dateParts["day"];
+    }
+}
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){
+function format_date_for_sql($date) {
     if ($date == "")
         return null;
     else {
         $dateParts = date_parse($date);
-        return $dateParts['year']*10000 + '-' + $dateParts['month']*100 + '-' + $dateParts['day'];
-   }
+        return $dateParts['year'] * 10000 + '-' + $dateParts['month'] * 100 + '-' + $dateParts['day'];
+    }
 }
 ----
 
-If the input string is empty, the code returns NULL. Otherwise, the internal  ``date_parse``  function is called with the  ``$date``  as the input parameter. The  ``date_parse``  function returns an array that consists of three elements named  ``$dateParts["year"]`` ,  ``$dateParts["month"]`` , and  ``$dateParts["day"]`` . The final output string is constructed of the elements of the  ``$dateParts``  array.
+If the input string is empty, the code returns NULL. Otherwise, the internal  `date_parse`  function is called with the  `$date`  as the input parameter. The  `date_parse`  function returns an array that consists of three elements named  `$dateParts["year"]` ,  `$dateParts["month"]` , and  `$dateParts["day"]` . The final output string is constructed of the elements of the  `$dateParts`  array.
 
-*Important:* The  ``date_parse``  function recognizes only English dates. For example, it parses "February 2, 2016" but not "2 Unora, 2016".
+*Important:* The  `date_parse`  function recognizes only English dates. For example, it parses "February 2, 2016" but not "2 Unora, 2016".
 
-*Note to Oracle Database users:* The only format requirement is that the format of the date in the  ``return $dateParts...``  statement matches the date format in the  ``to_date``  SQL function in the  ``insert_wish``  query.
+*Note to Oracle Database users:* The only format requirement is that the format of the date in the  `return $dateParts...`  statement matches the date format in the  `to_date`  SQL function in the  `insert_wish`  query.
 
 
 [[validateAndEnterWishToDatabase]]
 === Entering the New Wish Record in the Database
 
-Now that you have developed the auxiliary functions, add code to validate the new wish data and enter the data to the database if it is valid. If the data is not valid, the code must reload the Add Wish form. If the data is invalid because no description has been entered but there is a due date, the due date is saved and redisplayed when the form reloads, thanks to code you <<inputFormAfterunsuccessfulSave,developed earlier>>.
+Now that you have developed the auxiliary functions, add code to validate the new wish data and enter the data to the database if it is valid. If the data is not valid, the code must reload the Add Wish form. If the data is invalid because no description has been entered but there is a due date, the due date is saved and redisplayed when the form reloads, thanks to code you <<_returning_to_the_front_index_php_page,developed earlier>>.
 
-Enter the following code inside the top <? php?> block of  ``editWish.php`` , below the session handling code:
+Enter the following code inside the top <? php?> block of  `editWish.php` , below the session handling code:
 
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
 
-    $wishDescriptionIsEmpty = false;
-    if ($_SERVER['REQUEST_METHOD'] == "POST"){
-        if (array_key_exists("back", $_POST)) {
-           header('Location: editWishList.php' ); 
-           exit;
-        } else
-        if ($_POST['wish'] == "") {
-            $wishDescriptionIsEmpty =  true;
-        } 
-		 else {
-           WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
-           header('Location: editWishList.php' );
-           exit;
-        }
+$wishDescriptionIsEmpty = false;
+if ($_SERVER['REQUEST_METHOD'] == "POST"){
+    if (array_key_exists("back", $_POST)) {
+        header('Location: editWishList.php' ); 
+        exit;
+    } else
+    if ($_POST['wish'] == "") {
+        $wishDescriptionIsEmpty =  true;
+    } else {
+        WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
+        header('Location: editWishList.php' );
+        exit;
     }
+}
 	
 ----
 
 The code performs the following functions:
 
-* Enables the use of the  ``db.php``  file
-* Gets or creates an instance of the class  ``WishDB`` 
-* Retrieves the id of the wisher who is attempting to add a wish by calling the function  ``get_wisher_id_by_name`` 
-* Initializes the  ``$wishDescriptionIsEmpty``  flag, which will be used later for showing error messages.
-* Checks that the Request method is POST, which means that the data was submitted from the form for entering the wish data on the  ``editWish.php``  page itself.
-* Checks whether the  ``$_POST``  array contains an element with the "back" key
+* Enables the use of the  `db.php`  file
+* Gets or creates an instance of the class  `WishDB` 
+* Retrieves the id of the wisher who is attempting to add a wish by calling the function  `get_wisher_id_by_name` 
+* Initializes the  `$wishDescriptionIsEmpty`  flag, which will be used later for showing error messages.
+* Checks that the Request method is POST, which means that the data was submitted from the form for entering the wish data on the  `editWish.php`  page itself.
+* Checks whether the  `$_POST`  array contains an element with the "back" key
 
-If the  ``$_POST``  array contains an element with the "back" key, the Back to the List button was pressed before submitting the form. In this case the code redirects the user to the  ``editWishList.php``  without saving any data that was entered in the fields and stops PHP processing.
+If the  `$_POST`  array contains an element with the "back" key, the Back to the List button was pressed before submitting the form. In this case the code redirects the user to the  `editWishList.php`  without saving any data that was entered in the fields and stops PHP processing.
 
 If the $_POST array _does not_ contain an element with the "back" key, the data was submitted by pressing the Save Changes button. In this case the code validates whether the wish description is filled in. The code does it by checking whether the element with the "wish" key in the $_POST array is empty and, if the key is empty, changes the $wishDescriptionIsEmpty flag to true. Note that with no further code executed in the PHP block, the Add Wish form reloads.
 
-If the Back to the List button was not pressed and the wish description is filled in, the code calls the function  ``insert_wish``  with the wisher's id, the description, and the due date for the wish as the input parameters. The code then redirects the user to the  ``editWishList.php``  page and stops the PHP processing.
+If the Back to the List button was not pressed and the wish description is filled in, the code calls the function  `insert_wish`  with the wisher's id, the description, and the due date for the wish as the input parameters. The code then redirects the user to the  `editWishList.php`  page and stops the PHP processing.
 
-
+[[_displaying_error_messages]]
 === Displaying Error Messages
 
 If the user attempts to save a wish but has not entered a description for it, an error message must be displayed.
@@ -406,16 +410,19 @@
 [source,php]
 ----
 
-<?phpif ($wishDescriptionIsEmpty) echo "Please enter description<br/>";?>
+<?php
+if ($wishDescriptionIsEmpty)
+    echo "Please enter description<br/>";
+?>
 ----
 
-The error message is displayed if the  ``$wishDescriptionIsEmpty``  flag is true. The flag is processed during the input form validation.
+The error message is displayed if the  `$wishDescriptionIsEmpty`  flag is true. The flag is processed during the input form validation.
 
-
+[[_returning_to_the_front_index_php_page]]
 == Returning to the Front index.php Page
 
 The user should be able to return to the front page of the application at any time by pressing a button. 
-To implement this functionality, enter the following HTML input form in the  ``editWishList.php``  file, before the closing </body> tag:
+To implement this functionality, enter the following HTML input form in the  `editWishList.php`  file, before the closing </body> tag:
 
 
 [source,xml]
@@ -426,30 +433,33 @@
 
 The form redirects the user to the front index.php page upon pressing the Back to Main Page button.
 
-
+[[_testing_the_add_wish_functionality]]
 == Testing the Add Wish Functionality
 
-1. Run the application. On the  ``index.php``  page, fill in the fields: in the Username field, enter "Tom", in the Password field, enter "tomcat".
+1. Run the application. On the  `index.php`  page, fill in the fields: in the Username field, enter "Tom", in the Password field, enter "tomcat".
 image::images/user-logon-to-edit-wish-list.png[]
-2. Press the Edit My Wish List button. The  ``editWishList.php``  page opens. 
+2. Press the Edit My Wish List button. The  `editWishList.php`  page opens. 
 image::images/edit-wish-list-add-wish.png[]
-3. Press the Back to Main Page button. The  ``index.php``  page opens.
-4. Logon as Tom and press the Edit My Wish List button again. The  ``editWishList.php``  page opens.
-5. Press the Add Wish button. The  ``editWish.php``  page opens. Fill in the form.
+3. Press the Back to Main Page button. The  `index.php`  page opens.
+4. Logon as Tom and press the Edit My Wish List button again. The  `editWishList.php`  page opens.
+5. Press the Add Wish button. The  `editWish.php`  page opens. Fill in the form.
+
 image::images/new-wish.png[] 
-Press the Back to the List button. The  ``editWishList.php``  page opens but the entered wish is not added.
-6. Press the Add Wish button again. The  ``editWish.php``  page opens. Fill in the due date and leave the description empty. Press the Save Changes button. The  ``editWish.php``  page displays the input form with an error message and filled in due date.
-7. Press the Add Wish button again. The  ``editWish.php``  page opens. Fill in the form and press the Save Changes button. The  ``editWishList.php``  page shows an updated list of wishes. 
+
+Press the Back to the List button. The  `editWishList.php`  page opens but the entered wish is not added.
+6. Press the Add Wish button again. The  `editWish.php`  page opens. Fill in the due date and leave the description empty. Press the Save Changes button. The  `editWish.php`  page displays the input form with an error message and filled in due date.
+7. Press the Add Wish button again. The  `editWish.php`  page opens. Fill in the form and press the Save Changes button. The  `editWishList.php`  page shows an updated list of wishes. 
+
 image::images/edit-wish-list-updated.png[]
 
-
+[[_application_source_code_after_the_current_lesson_is_completed]]
 == Application Source Code after the Current Lesson Is Completed
 
-MySQL users: Click link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+MySQL users: Click link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-
+[[_next_steps]]
 == Next Steps
 
 link:wish-list-lesson5.html[+<< Previous lesson+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ja.asciidoc
index 17875a7..5124752 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ja.asciidoc
@@ -43,57 +43,36 @@
 
 
 
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. 
-link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. 
-*=> データベースへの新しいウィッシュの追加*
-
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 このレッスンでは、次の2つの機能を使用してアプリケーションの機能を拡張します。
 
 
-この機能を実装するには、 ``editWishList.php`` ファイルを編集し、新しいファイル ``editWish.php`` を作成します。
+この機能を実装するには、 `editWishList.php` ファイルを編集し、新しいファイル `editWish.php` を作成します。
 
 image::images/page-flow-diagram-l6.png[]
 
 現在のドキュメントは、link:wish-list-tutorial-main-page.html[+PHP向けのNetBeans IDEでのCRUDアプリケーションの作成+]というチュートリアルの一部です。
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == 前のレッスンからのアプリケーション・ソース・コード
 
 MySQLユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+ここ+]をクリックします。
 
 Oracleデータベース・ユーザー: 前のレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+ここ+]をクリックします。
 
-
+[[_submitting_a_new_wish]]
 == 新規ウィッシュの送信
 
 ユーザーは、次の手順で新しいウィッシュを送信します。
 
-1. ユーザーは、ログインして ``editWishList.php`` ページに切り替え、「Add Wish」ボタンを押します。 ``editWish.php`` ページが開き、HTMLフォームが表示されます。
+1. ユーザーは、ログインして `editWishList.php` ページに切り替え、「Add Wish」ボタンを押します。 `editWish.php` ページが開き、HTMLフォームが表示されます。
 2. HTMLフォームで、ユーザーはウィッシュの説明と、必要に応じてウィッシュが必要な期日を入力し、「Save Changes」ボタンをクリックします。
 3. ウィッシュの説明を入力せずにフォームを送信すると、ユーザーはもう一度実行するようにフォームに戻されます。ユーザーが説明なしで期日を送信した場合、その日付はフォームが再ロードされるときに再表示されます。
 
 ユーザーがこの手順を実行できるようにするには、アプリケーションに次の機能を追加します。
 
-* ウィッシュを追加するためのHTMLフォームと、ユーザーをフォームにリダイレクトする ``editWishList.php`` のボタンで構成された<<add-wish-ui-elements,ユーザー・インタフェース・コンポーネント>>。
-* 不完全なフォームが送信された場合に、<<inputFormAfterunsuccessfulSave,期日を再表示>>するためのコード。
+* ウィッシュを追加するためのHTMLフォームと、ユーザーをフォームにリダイレクトする `editWishList.php` のボタンで構成された<<add-wish-ui-elements,ユーザー・インタフェース・コンポーネント>>。
+* 不完全なフォームが送信された場合に、<<_redisplaying_the_due_date_after_an_unsuccessful_submission,期日を再表示>>するためのコード。
 
 
 [[add-wish-ui-elements]]
@@ -101,7 +80,7 @@
 
 *新規ウィッシュを追加するための機能を追加するには:*
 
-1. 「Add Wish」ボタンを実装します。 ``editWishList.php`` ファイルで、次のHTMLコードをPHPブロックの下に追加します。
+1. 「Add Wish」ボタンを実装します。 `editWishList.php` ファイルで、次のHTMLコードをPHPブロックの下に追加します。
 
 [source,xml]
 ----
@@ -120,11 +99,11 @@
 </html>
 ----
 
-*注意: *HTMLバリデータからの警告は無視できます。
+*注意:* HTMLバリデータからの警告は無視できます。
 
-フォームには、 ``submit`` 型の「Add Wish」入力フィールドが含まれています。このフィールドは「Add Wish」ボタンを実装します。ユーザーが「Add Wish」をクリックすると、 ``editWish.php`` ページにリダイレクトされます。データはこのフォームを介して転送されないため、サーバー・リクエスト・メソッドは使用されません。
+フォームには、 `submit` 型の「Add Wish」入力フィールドが含まれています。このフィールドは「Add Wish」ボタンを実装します。ユーザーが「Add Wish」をクリックすると、 `editWish.php` ページにリダイレクトされます。データはこのフォームを介して転送されないため、サーバー・リクエスト・メソッドは使用されません。
 
-2. ウィッシャの既存のウィッシュを表示する表をaddNewWishフォームの上に追加します。コードは ``wishlist.php`` と似ています。
+2. ウィッシャの既存のウィッシュを表示する表をaddNewWishフォームの上に追加します。コードは `wishlist.php` と似ています。
 
 *MySQLデータベースの場合*:
 
@@ -132,7 +111,20 @@
 [source,php]
 ----
 
-<table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row['description']) . "</td>";echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";}?></table>
+<table border="black">
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
+    <?php
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+        echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+</table>
 ----
 
 *Oracleデータベースの場合:*
@@ -152,8 +144,8 @@
     ?>
 </table>
 ----
-3. 「ソース・ファイル」フォルダで ``editWish.php``  PHPファイルを作成します。
-4.  ``editWish.php`` でAdd Wishフォームを実装します。次のコードを<?php?>ブロックの下に入力するか、または貼り付けます。
+3. 「ソース・ファイル」フォルダで `editWish.php`  PHPファイルを作成します。
+4.  `editWish.php` でAdd Wishフォームを実装します。次のコードを<?php?>ブロックの下に入力するか、または貼り付けます。
 
 [source,xml]
 ----
@@ -163,10 +155,14 @@
 <html>
     <head>
 
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
-        <form name="editWish" action="editWish.php" method="POST">Describe your wish: <input type="text" name="wish"  value="" /><br/>When do you want to get it? <input type="text" name="dueDate" value=""/><br/><input type="submit" name="saveWish" value="Save Changes"/><input type="submit" name="back" value="Back to the List"/>
+        <form name="editWish" action="editWish.php" method="POST">
+            Describe your wish: <input type="text" name="wish"  value="" /><br/>
+            When do you want to get it? <input type="text" name="dueDate" value=""/><br/>
+            <input type="submit" name="saveWish" value="Save Changes"/>
+            <input type="submit" name="back" value="Back to the List"/>
         </form>
     </body>
 </html> 
@@ -176,39 +172,44 @@
 
 * ウィッシュの説明と期日を入力するための、2つの空のテキスト・フィールド。
 * 入力フィールドの横に出力されるテキスト。
-* 「Save Changes」ボタンを表す ``submit`` フィールド。
-*  ``editWishList.php`` ページに戻るための「Back to the List」ボタンを表す ``submit`` フィールド。
+* 「Save Changes」ボタンを表す `submit` フィールド。
+*  `editWishList.php` ページに戻るための「Back to the List」ボタンを表す `submit` フィールド。
 
-「Add Wish」ボタンを押すと、フォームはリクエスト・メソッドPOSTを介して、入力したデータを同じ ``editWish.php`` ページに送信します。
+「Add Wish」ボタンを押すと、フォームはリクエスト・メソッドPOSTを介して、入力したデータを同じ `editWish.php` ページに送信します。
 
-
+[[_redisplaying_the_due_date_after_an_unsuccessful_submission]]
 === 送信に失敗した後の期日の再表示
 
-ユーザーがAdd Wishフォームに説明を入力しなかった場合、エラー・メッセージが表示され、ユーザーは ``editWish.php`` ページに戻ります。ユーザーが ``editWish.php`` に戻ると、 ``dueDate`` を入力していた場合はAdd Wishフォームにその値が表示されます。現在のフォームの実装では、両方のフィールドは常に空です。入力した値を保持するには、新しいウィッシュのデータを配列に保存する必要があります。配列は ``description`` と ``due_date`` という名前の2つの要素で構成されます。配列から ``dueDate`` フィールドの値を取得するように、Add Wishフォームを変更する必要があります。
+ユーザーがAdd Wishフォームに説明を入力しなかった場合、エラー・メッセージが表示され、ユーザーは `editWish.php` ページに戻ります。ユーザーが `editWish.php` に戻ると、 `dueDate` を入力していた場合はAdd Wishフォームにその値が表示されます。現在のフォームの実装では、両方のフィールドは常に空です。入力した値を保持するには、新しいウィッシュのデータを配列に保存する必要があります。配列は `description` と `due_date` という名前の2つの要素で構成されます。配列から `dueDate` フィールドの値を取得するように、Add Wishフォームを変更する必要があります。
 
-*注意:* 説明が入力されていない場合に入力フォームを再ロードするコードは、<<validateAndEnterWishToDatabase,データを検証してデータベースに入力するコード>>に含まれています。このコードについては、この項では説明しません。この項のコードは、フォームが再ロードされた場合に ``dueDate`` の値が表示されるように、その値を保持するのみです。
+*注意:* 説明が入力されていない場合に入力フォームを再ロードするコードは、<<_verifying_the_wisher_s_logon,データを検証してデータベースに入力するコード>>に含まれています。このコードについては、この項では説明しません。この項のコードは、フォームが再ロードされた場合に `dueDate` の値が表示されるように、その値を保持するのみです。
 
 *ユーザーが入力フォームの送信に失敗した場合に入力フォームを再表示するには:*
 
-1. 次のコード・ブロックを、 ``editWish.php`` のHTML <body>要素内で、入力フォームの直前に入力するか、または貼り付けます。
+1. 次のコード・ブロックを、 `editWish.php` のHTML <body>要素内で、入力フォームの直前に入力するか、または貼り付けます。
 
 [source,php]
 ----
 
-<?php 
-if ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("description" => $_POST["wish"], "due_date" => $_POST["dueDate"]);else$wish = array("description" => "", "due_date" => "");
-?>  
+<?php
+if ($_SERVER['REQUEST_METHOD'] == "POST")
+    $wish = array("description" => $_POST['wish'],
+                        "due_date" => $_POST['dueDate']);
+else
+    $wish = array("description" => "",
+                        "due_date" => "");
+?>
 ----
 
-このコードは、データの転送にどのサーバー・リクエスト・メソッドが使用されたかを確認し、$wishという名前の配列を作成します。メソッドがPOSTの場合、つまり説明が空の状態でウィッシュを保存しようとして失敗した後に入力フォームが表示される場合、 ``description`` と ``due_date`` の要素はPOSTを介して転送された値を受け取ります。
+このコードは、データの転送にどのサーバー・リクエスト・メソッドが使用されたかを確認し、$wishという名前の配列を作成します。メソッドがPOSTの場合、つまり説明が空の状態でウィッシュを保存しようとして失敗した後に入力フォームが表示される場合、 `description` と `due_date` の要素はPOSTを介して転送された値を受け取ります。
 
-メソッドがPOSTでない場合、つまり ``editWishList.php`` ページからのリダイレクト後に初めて入力フォームが表示される場合、 ``description`` と ``due_date`` の要素は空です。
+メソッドがPOSTでない場合、つまり `editWishList.php` ページからのリダイレクト後に初めて入力フォームが表示される場合、 `description` と `due_date` の要素は空です。
 
-*注意:* どちらの場合も説明は空です。 ``dueDate`` が異なるのみです。
+*注意:* どちらの場合も説明は空です。 `dueDate` が異なるのみです。
 
-2. Add Wishフォームの入力フィールドの値が ``$wish`` 配列から取得されるように、Add Wishフォームを更新します。Add Wishフォームの次の行が対象です。
+2. Add Wishフォームの入力フィールドの値が `$wish` 配列から取得されるように、Add Wishフォームを更新します。Add Wishフォームの次の行が対象です。
 
-[source,java]
+[source,php]
 ----
 
 Describe your wish: <input type="text" name="wish"  value="" /><br/>
@@ -223,13 +224,13 @@
 When do you want to get it? <input type="text" name="dueDate" value="<?php echo $wish['due_date']; ?>"/><br/>
 ----
 
-
+[[_verifying_the_wisher_s_logon]]
 == ウィッシャのログオンの確認
 
- ``editWish.php`` ファイルで、ファイルの先頭の<? >ブロック内に次のセッション処理コードを入力します。
+ `editWish.php` ファイルで、ファイルの先頭の<? >ブロック内に次のセッション処理コードを入力します。
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -253,10 +254,10 @@
 
 ユーザーが新しいウィッシュを送信した後、アプリケーションはそのウィッシュを「wishes」データベースに追加する必要があります。この機能を有効にするには、次のコードをアプリケーションに追加します。
 
-*  ``db.php`` の ``WishDB`` クラスに、補助関数をさらに2つ追加する。
+*  `db.php` の `WishDB` クラスに、補助関数をさらに2つ追加する。
 * 1つの関数は、wishes表に新しいレコードを追加します。
 * もう1つの関数は、日付をMySQLデータベース・サーバーがサポートする形式に変換します。
-*  ``WishDB`` の新しい補助関数を使用してデータベースに新しいウィッシュを入力するコードを、 ``editWish.php`` に追加する。
+*  `WishDB` の新しい補助関数を使用してデータベースに新しいウィッシュを入力するコードを、 `editWish.php` に追加する。
 
 
 [[add-insert-wish]]
@@ -264,33 +265,40 @@
 
 この関数は、入力パラメータとして、ウィッシャのID、新しいウィッシュの説明、およびそのウィッシュの期日を必要とし、このデータをデータベースの新規レコードに入力します。この関数は値を返しません。
 
- ``db.php`` を開き、関数 ``insert_wish`` を ``WishDB`` クラスに追加します。
+ `db.php` を開き、関数 `insert_wish` を `WishDB` クラスに追加します。
 
 *MySQLデータベースの場合*
 
 
-[source,java]
+[source,php]
 ----
 
-function insert_wish($wisherID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($this->format_date_for_sql($duedate)==null){$this->query("INSERT INTO wishes (wisher_id, description)" ." VALUES (" . $wisherID . ", '" . $description . "')");} else$this->query("INSERT INTO wishes (wisher_id, description, due_date)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ")");
+function insert_wish($wisherID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($this->format_date_for_sql($duedate)==null){
+       $this->query("INSERT INTO wishes (wisher_id, description)" .
+            " VALUES (" . $wisherID . ", '" . $description . "')");
+    } else
+        $this->query("INSERT INTO wishes (wisher_id, description, due_date)" .
+            " VALUES (" . $wisherID . ", '" . $description . "', "
+            . $this->format_date_for_sql($duedate) . ")");
 }
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 function insert_wish($wisherID, $description, $duedate) {
-  $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))"; 
-  $stid = oci_parse($this->con, $query);
-  oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
-  oci_bind_by_name($stid, ':desc_bv', $description);
-  oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
-  oci_execute($stid);
-  oci_free_statement($stid);
+    $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))";
+    $stid = oci_parse($this->con, $query);
+    oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
+    oci_bind_by_name($stid, ':desc_bv', $description);
+    oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
+    oci_execute($stid);
+    oci_free_statement($stid);
 }
 ----
 
@@ -300,90 +308,96 @@
 [[add-format-date-for-sql]]
 === WishDBへのformat_date_for_sql関数の追加
 
-関数 ``format_date_for_sql`` を ``db.php`` 内の ``WishDB`` クラスに追加します。この関数は、入力パラメータとして日付の入った文字列を必要とします。この関数は、データベース・サーバーが処理できる形式で日付を返すか、または入力文字列が空の場合は ``null`` を返します。
+関数 `format_date_for_sql` を `db.php` 内の `WishDB` クラスに追加します。この関数は、入力パラメータとして日付の入った文字列を必要とします。この関数は、データベース・サーバーが処理できる形式で日付を返すか、または入力文字列が空の場合は `null` を返します。
 
-*注意:* この例の関数は、PHP  ``date_parse`` 関数を使用します。この関数は、「December 25, 2010」などの英語の日付でのみ機能し、アラビア数字専用です。高度なWebサイトでは日付ピッカーを使用します。
+*注意:* この例の関数は、PHP  `date_parse` 関数を使用します。この関数は、「December 25, 2010」などの英語の日付でのみ機能し、アラビア数字専用です。高度なWebサイトでは日付ピッカーを使用します。
 
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){if ($date == "")return null;else {$dateParts = date_parse($date);return $dateParts["year"]*10000 + $dateParts["month"]*100 + $dateParts["day"];}}
+function format_date_for_sql($date) {
+    if ($date == "")
+        return null;
+    else {
+        $dateParts = date_parse($date);
+        return $dateParts["year"] * 10000 + $dateParts["month"] * 100 + $dateParts["day"];
+    }
+}
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){
+function format_date_for_sql($date) {
     if ($date == "")
         return null;
     else {
         $dateParts = date_parse($date);
-        return $dateParts['year']*10000 + '-' + $dateParts['month']*100 + '-' + $dateParts['day'];
-   }
+        return $dateParts['year'] * 10000 + '-' + $dateParts['month'] * 100 + '-' + $dateParts['day'];
+    }
 }
 ----
 
-入力文字列が空の場合、このコードはNULLを返します。それ以外の場合は、入力パラメータとして ``$date`` を使用する内部の ``date_parse`` 関数がコールされます。 ``date_parse`` 関数は、 ``$dateParts["year"]`` 、 ``$dateParts["month"]`` 、および ``$dateParts["day"]`` の3つの要素から構成される配列を返します。最終的な出力文字列は、 ``$dateParts`` 配列の要素で構成されます。
+入力文字列が空の場合、このコードはNULLを返します。それ以外の場合は、入力パラメータとして `$date` を使用する内部の `date_parse` 関数がコールされます。 `date_parse` 関数は、 `$dateParts["year"]` 、 `$dateParts["month"]` 、および `$dateParts["day"]` の3つの要素から構成される配列を返します。最終的な出力文字列は、 `$dateParts` 配列の要素で構成されます。
 
-*重要:*  ``date_parse`` 関数は英語の日付のみ認識します。たとえば、「February 2, 2016」は解析しますが、「2 Unora, 2016」は解析しません。
+*重要:*  `date_parse` 関数は英語の日付のみ認識します。たとえば、「February 2, 2016」は解析しますが、「2 Unora, 2016」は解析しません。
 
-*Oracleデータベース・ユーザーへの注意:* 形式の要件は、 ``return$dateParts...`` 文の日付の形式が、 ``insert_wish`` 問合せの ``to_date``  SQL関数の日付形式と一致することのみです。
+*Oracleデータベース・ユーザーへの注意:* 形式の要件は、 `return$dateParts...` 文の日付の形式が、 `insert_wish` 問合せの `to_date`  SQL関数の日付形式と一致することのみです。
 
 
 [[validateAndEnterWishToDatabase]]
 === データベースへの新規ウィッシュ・レコードの入力
 
-補助関数の開発が完了したので、新規ウィッシュ・データを検証するコードを追加し、データが有効である場合は、そのデータをデータベースに入力します。データが有効でない場合、コードはAdd Wishフォームを再ロードする必要があります。期日が入力されているが説明が入力されていないためにデータが無効な場合、フォームが再ロードされるときに、<<inputFormAfterunsuccessfulSave,以前に開発したコード>>によって期日が保存され、再表示されます。
+補助関数の開発が完了したので、新規ウィッシュ・データを検証するコードを追加し、データが有効である場合は、そのデータをデータベースに入力します。データが有効でない場合、コードはAdd Wishフォームを再ロードする必要があります。期日が入力されているが説明が入力されていないためにデータが無効な場合、フォームが再ロードされるときに、<<_returning_to_the_front_index_php_page,以前に開発したコード>>によって期日が保存され、再表示されます。
 
-次のコードを、先頭の<?php?>ブロック( ``editWish.php`` 内)のセッション処理コードの下に入力します。
+次のコードを、先頭の<?php?>ブロック( `editWish.php` 内)のセッション処理コードの下に入力します。
 
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
 
-    $wishDescriptionIsEmpty = false;
-    if ($_SERVER['REQUEST_METHOD'] == "POST"){
-        if (array_key_exists("back", $_POST)) {
-           header('Location: editWishList.php' ); 
-           exit;
-        } else
-        if ($_POST['wish'] == "") {
-            $wishDescriptionIsEmpty =  true;
-        } 
-		 else {
-           WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
-           header('Location: editWishList.php' );
-           exit;
-        }
+$wishDescriptionIsEmpty = false;
+if ($_SERVER['REQUEST_METHOD'] == "POST"){
+    if (array_key_exists("back", $_POST)) {
+        header('Location: editWishList.php' ); 
+        exit;
+    } else
+    if ($_POST['wish'] == "") {
+        $wishDescriptionIsEmpty =  true;
+    } else {
+        WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
+        header('Location: editWishList.php' );
+        exit;
     }
-	
+}
+    
 ----
 
 このコードは次の関数を実行します。
 
-*  ``db.php`` ファイルの使用を有効にする。
-* クラス ``WishDB`` のインスタンスを取得または作成する。
-* 関数 ``get_wisher_id_by_name`` をコールして、ウィッシュを追加しようとしているウィッシャのIDを取得する。
-*  ``$wishDescriptionIsEmpty`` フラグを初期化する(これは、後でエラー・メッセージの表示に使用されます)。
-* リクエスト・メソッドがPOSTであることを確認する(これは、このデータが ``editWish.php`` ページ自身のウィッシュ・データを入力するためのフォームから送信されたことを意味します)。
-*  ``$_POST`` 配列が「back」キーを持つ要素を含んでいるかどうかを確認する。
+*  `db.php` ファイルの使用を有効にする。
+* クラス `WishDB` のインスタンスを取得または作成する。
+* 関数 `get_wisher_id_by_name` をコールして、ウィッシュを追加しようとしているウィッシャのIDを取得する。
+*  `$wishDescriptionIsEmpty` フラグを初期化する(これは、後でエラー・メッセージの表示に使用されます)。
+* リクエスト・メソッドがPOSTであることを確認する(これは、このデータが `editWish.php` ページ自身のウィッシュ・データを入力するためのフォームから送信されたことを意味します)。
+*  `$_POST` 配列が「back」キーを持つ要素を含んでいるかどうかを確認する。
 
- ``$_POST`` 配列が「back」キーを持つ要素を含んでいる場合、フォームを送信する前に「Back to the List」ボタンが押されます。この場合、コードは、フィールドに入力されたデータを保存せずにユーザーを ``editWishList.php`` にリダイレクトし、PHP処理を停止します。
+ `$_POST` 配列が「back」キーを持つ要素を含んでいる場合、フォームを送信する前に「Back to the List」ボタンが押されます。この場合、コードは、フィールドに入力されたデータを保存せずにユーザーを `editWishList.php` にリダイレクトし、PHP処理を停止します。
 
 $_POST配列が「back」キーを持つ要素を含んで_いない_場合、データは「Save Changes」ボタンを押すことによって送信されます。この場合、コードは、ウィッシュの説明が入力されているかどうかを検証します。コードは、$_POST配列内の「wish」キー持つ要素が空であるかどうかを確認し、キーが空の場合は$wishDescriptionIsEmptyフラグをtrueに変更します。PHPブロックのコードがさらに実行されることはなく、Add Wishフォームが再ロードされます。
 
-「Back to the List」ボタンが押されず、ウィッシュの説明が入力されている場合、コードは入力パラメータとしてウィッシャのID、ウィッシュの説明、およびウィッシュの期日を持つ関数 ``insert_wish`` をコールします。コードはユーザーを ``editWishList.php`` ページにリダイレクトし、PHP処理を停止します。
+「Back to the List」ボタンが押されず、ウィッシュの説明が入力されている場合、コードは入力パラメータとしてウィッシャのID、ウィッシュの説明、およびウィッシュの期日を持つ関数 `insert_wish` をコールします。コードはユーザーを `editWishList.php` ページにリダイレクトし、PHP処理を停止します。
 
-
+[[_displaying_error_messages]]
 === エラー・メッセージの表示
 
 ユーザーがウィッシュの説明を入力せずにウィッシュを保存しようとした場合、エラー・メッセージが表示されます。
@@ -393,16 +407,19 @@
 [source,php]
 ----
 
-<?phpif ($wishDescriptionIsEmpty) echo "Please enter description<br/>";?>
+<?php
+if ($wishDescriptionIsEmpty)
+    echo "Please enter description<br/>";
+?>
 ----
 
- ``$wishDescriptionIsEmpty`` フラグがtrueの場合は、エラー・メッセージが表示されます。フラグは、入力フォームの検証時に処理されます。
+ `$wishDescriptionIsEmpty` フラグがtrueの場合は、エラー・メッセージが表示されます。フラグは、入力フォームの検証時に処理されます。
 
-
+[[_returning_to_the_front_index_php_page]]
 == 最初のindex.phpページへの復帰
 
 ボタンを押すことによって、ユーザーがいつでもアプリケーションの最初のページに戻ることができるようにします。
-この機能を実装するには、次のHTML入力フォームを ``editWishList.php`` ファイルの終了</body>タグの前に入力します。
+この機能を実装するには、次のHTML入力フォームを `editWishList.php` ファイルの終了</body>タグの前に入力します。
 
 
 [source,xml]
@@ -413,30 +430,33 @@
 
 「Back to Main Page」ボタンを押すと、フォームは、ユーザーを最初のindex.phpページにリダイレクトします。
 
-
+[[_testing_the_add_wish_functionality]]
 == ウィッシュの追加機能のテスト
 
-1. アプリケーションを実行します。 ``index.php`` ページで、「Username」フィールドに「Tom」、「Password」フィールドに「tomcat」と入力します。
+1. アプリケーションを実行します。 `index.php` ページで、「Username」フィールドに「Tom」、「Password」フィールドに「tomcat」と入力します。
 image::images/user-logon-to-edit-wish-list.png[]
-2. 「Edit My Wish List」ボタンを押します。 ``editWishList.php`` ページが開きます。
+2. 「Edit My Wish List」ボタンを押します。 `editWishList.php` ページが開きます。
+
 image::images/edit-wish-list-add-wish.png[]
-3. 「Back to Main Page」ボタンを押します。 ``index.php`` ページが開きます。
-4. 「Tom」としてログオンし、もう一度「Edit My Wish List」ボタンを押します。 ``editWishList.php`` ページが開きます。
-5. 「Add Wish」ボタンを押します。 ``editWish.php`` ページが開きます。フォームに入力します。
+
+3. 「Back to Main Page」ボタンを押します。 `index.php` ページが開きます。
+4. 「Tom」としてログオンし、もう一度「Edit My Wish List」ボタンを押します。 `editWishList.php` ページが開きます。
+5. 「Add Wish」ボタンを押します。 `editWish.php` ページが開きます。フォームに入力します。
 image::images/new-wish.png[]
-「Back to the List」ボタンを押します。 ``editWishList.php`` ページが開きますが、入力したウィッシュは追加されていません。
-6. 再度「Add Wish」ボタンを押します。 ``editWish.php`` ページが開きます。期日を入力し、説明を空のままにします。「Save Changes」ボタンを押します。 ``editWish.php`` ページには、エラー・メッセージが表示され、期日が入力されている状態の入力フォームが表示されます。
-7. 再度「Add Wish」ボタンを押します。 ``editWish.php`` ページが開きます。フォームに入力し、「Save Changes」ボタンを押します。 ``editWishList.php`` ページに更新されたウィッシュのリストが表示されます。
+「Back to the List」ボタンを押します。 `editWishList.php` ページが開きますが、入力したウィッシュは追加されていません。
+6. 再度「Add Wish」ボタンを押します。 `editWish.php` ページが開きます。期日を入力し、説明を空のままにします。「Save Changes」ボタンを押します。 `editWish.php` ページには、エラー・メッセージが表示され、期日が入力されている状態の入力フォームが表示されます。
+7. 再度「Add Wish」ボタンを押します。 `editWish.php` ページが開きます。フォームに入力し、「Save Changes」ボタンを押します。 `editWishList.php` ページに更新されたウィッシュのリストが表示されます。
+
 image::images/edit-wish-list-updated.png[]
 
-
+[[_application_source_code_after_the_current_lesson_is_completed]]
 == 現在のレッスン完了後のアプリケーション・ソース・コード
 
 MySQLユーザー: このレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+ここ+]をクリックします。
 
 Oracleデータベース・ユーザー: このレッスンが完了した後のプロジェクトの状態を反映したソース・コードをダウンロードするには、link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+ここ+]をクリックします。
 
-
+[[_next_steps]]
 == 次の手順
 
 link:wish-list-lesson5.html[+<< 前のレッスン+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_pt_BR.asciidoc
index d7ce911..043acc2 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_pt_BR.asciidoc
@@ -42,58 +42,36 @@
 :keywords: Apache NetBeans, Tutorials, Lição 6: Adicionado um Novo Desejo ao Banco de Dados
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. 
-link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário de Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. 
-*=> Adicionando um Novo Desejo ao Banco de Dados*
-
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
 Nesta lição, você expande a funcionalidade da aplicação com duas funcionalidades:
 
 
-Para implementar essa funcionalidade, edite o arquivo  ``editWishList.php``  e crie um novo arquivo  ``editWish.php`` .
+Para implementar essa funcionalidade, edite o arquivo  `editWishList.php`  e crie um novo arquivo  `editWish.php` .
 
 image::images/page-flow-diagram-l6.png[]
 
 O documento atual é uma parte do tutorial Criando uma Aplicação CRUD no NetBeans IDE para PHP.
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == Código-fonte da Aplicação da Lição Anterior
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior for concluída.
 
 Usuários do banco de dados Oracle: clique link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior for concluída.
 
-
+[[_submitting_a_new_wish]]
 == Enviando um Novo Desejo
 
 O usuário envia um novo desejo nas seguintes etapas:
 
-1. O usuário faz log-in, alterna para a página  ``editWishList.php``  e pressiona o botão Adicionar Desejo. A página  ``editWish.php``  abre, exibindo um form HTML.
+1. O usuário faz log-in, alterna para a página  `editWishList.php`  e pressiona o botão Adicionar Desejo. A página  `editWish.php`  abre, exibindo um form HTML.
 2. No form HTML, o usuário insere uma descrição de um desejo e, possivelmente, a data quando deseja recebê-lo e pressiona o botão Salvar Alterações.
 3. Se um form for enviado sem uma descrição do desejo, o usuário retorna ao form para tentar novamente. Caso o usuário tenha enviado uma data de vencimento mas nenhuma descrição, essa data é exibida novamente quando o form é recarregado.
 
 Para ativar esse procedimento para o usuário, adicione a seguinte funcionalidade à aplicação:
 
-* <<add-wish-ui-elements,Componentes da interface do usuário>>, consistindo em um form HTML para adicionar desejos e um botão em  ``editWishList.php `` que redireciona o usuário para o form.
-* Código para <<inputFormAfterunsuccessfulSave,reexibir a data de vencimento>> se um form incompleto for enviado.
+* <<add-wish-ui-elements,Componentes da interface do usuário>>, consistindo em um form HTML para adicionar desejos e um botão em  `editWishList.php ` que redireciona o usuário para o form.
+* Código para <<_redisplaying_the_due_date_after_an_unsuccessful_submission,reexibir a data de vencimento>> se um form incompleto for enviado.
 
 
 [[add-wish-ui-elements]]
@@ -101,7 +79,7 @@
 
 *Para adicionar funcionalidade para a adição um novo desejo:*
 
-1. Implementar o botão Adicionar Desejo. No arquivo  ``editWishList.php`` , adicione o seguinte código HTML abaixo do bloco PHP:
+1. Implementar o botão Adicionar Desejo. No arquivo  `editWishList.php` , adicione o seguinte código HTML abaixo do bloco PHP:
 
 [source,xml]
 ----
@@ -109,8 +87,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
     <head>
-
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
         <form name="addNewWish" action="editWish.php">            
@@ -120,11 +97,11 @@
 </html>
 ----
 
-*Observação: *você pode ignorar as advertências do validador HTML.
+*Observação:* você pode ignorar as advertências do validador HTML.
 
-O form contém um campo de entrada "Adicionar Desejo" do tipo  ``submit`` . Este campo implementa o botão "Adicionar desejo". Quando o usuário clica em Adicionar Desejo, ele é redirecionado para a página  ``editWish.php`` . Como nenhum dado é transferido usando esse form, nenhum método de Solicitação do Servidor é usado.
+O form contém um campo de entrada "Adicionar Desejo" do tipo  `submit` . Este campo implementa o botão "Adicionar desejo". Quando o usuário clica em Adicionar Desejo, ele é redirecionado para a página  `editWish.php` . Como nenhum dado é transferido usando esse form, nenhum método de Solicitação do Servidor é usado.
 
-2. Adicione uma tabela acima do form addNewWish que exibe os desejos existentes para o wisher. O código é semelhante ao código  ``wishlist.php`` .
+2. Adicione uma tabela acima do form addNewWish que exibe os desejos existentes para o wisher. O código é semelhante ao código  `wishlist.php` .
 
 *Para o banco de dados MySQL:*
 
@@ -132,7 +109,20 @@
 [source,php]
 ----
 
-<table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row['description']) . "</td>";echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";}?></table>
+<table border="black">
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
+    <?php
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+        echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+</table>
 ----
 
 *Para o banco de dados Oracle:*
@@ -142,18 +132,22 @@
 ----
 
 <table border="black">
-    <tr><th>Item</th><th>Due Date</th></tr>
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
     <?php
-    require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
-    while ($row = oci_fetch_array($stid)) {echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
+    while ($row = oci_fetch_array($stid)) {
+        echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";
+        echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
     }
+    oci_free_statement($stid);
     ?>
 </table>
 ----
-3. Crie o arquivo PHP  ``editWish.php``  na pasta Código-fonte.
-4. Em  ``editWish.php`` , implemente o form Adicionar Desejo. Digite ou cole o seguinte código abaixo do bloco <? php?>:
+3. Crie o arquivo PHP  `editWish.php`  na pasta Código-fonte.
+4. Em  `editWish.php` , implemente o form Adicionar Desejo. Digite ou cole o seguinte código abaixo do bloco <? php?>:
 
 [source,xml]
 ----
@@ -163,10 +157,14 @@
 <html>
     <head>
 
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
-        <form name="editWish" action="editWish.php" method="POST">Describe your wish: <input type="text" name="wish"  value="" /><br/>When do you want to get it? <input type="text" name="dueDate" value=""/><br/><input type="submit" name="saveWish" value="Save Changes"/><input type="submit" name="back" value="Back to the List"/>
+        <form name="editWish" action="editWish.php" method="POST">
+            Describe your wish: <input type="text" name="wish"  value="" /><br/>
+            When do you want to get it? <input type="text" name="dueDate" value=""/><br/>
+            <input type="submit" name="saveWish" value="Save Changes"/>
+            <input type="submit" name="back" value="Back to the List"/>
         </form>
     </body>
 </html> 
@@ -176,39 +174,44 @@
 
 * Dois campos de texto vazios para inserção da descrição e a data de vencimento do desejo.
 * Textos a serem impressos ao lado dos campos de entrada.
-* Um campo  ``submit``  que representa um botão Salvar Alterações
-* Um campo  ``submit``  que representa um botão Voltar à Lista para retornar à página  ``editWishList.php`` 
+* Um campo  `submit`  que representa um botão Salvar Alterações
+* Um campo  `submit`  que representa um botão Voltar à Lista para retornar à página  `editWishList.php` 
 
-Quando o botão Adicionar Desejo é pressionado, o form envia os dados inseridos para a mesma página,  ``editWish.php`` , usando o método de Solicitação POST.
+Quando o botão Adicionar Desejo é pressionado, o form envia os dados inseridos para a mesma página,  `editWish.php` , usando o método de Solicitação POST.
 
-
+[[_redisplaying_the_due_date_after_an_unsuccessful_submission]]
 === Reexibindo a Data de Vencimento Após um Envio Malsucedido
 
-Se o usuário não preencher uma descrição no form Adicionar Desejo, uma mensagem de erro é exibida e o usuário retorna à página  ``editWish.php`` . Quando o usuário retorna ao  ``editWish.php`` , o form Adicionar Desejo deve mostrar o valor de  ``dueDate``  caso ele tenha sido inserido. Na implementação atual do form, ambos os campos estão sempre vazios. Para manter os valores inseridos, você precisa salvar os dados do novo desejo em um array. O array consistirá em dois elementos chamados  ``description``  e  ``due-date`` . Em seguida, você precisa alterar o form Adicionar Desejo, para que ele recupere o valor do campo  ``dueDate``  do array.
+Se o usuário não preencher uma descrição no form Adicionar Desejo, uma mensagem de erro é exibida e o usuário retorna à página  `editWish.php` . Quando o usuário retorna ao  `editWish.php` , o form Adicionar Desejo deve mostrar o valor de  `dueDate`  caso ele tenha sido inserido. Na implementação atual do form, ambos os campos estão sempre vazios. Para manter os valores inseridos, você precisa salvar os dados do novo desejo em um array. O array consistirá em dois elementos chamados  `description`  e  `due-date` . Em seguida, você precisa alterar o form Adicionar Desejo, para que ele recupere o valor do campo  `dueDate`  do array.
 
-*Observação: *O código que recarrega o form de entrada, caso nenhuma descrição tenha sido inserida, é incluído no <<validateAndEnterWishToDatabase,código que valida os dados e insere-os no banco de dados>>. Esse código não é descrito nesta seção. O código desta seção preserva somente o valor de  ``dueDate``  para que ele seja exibido se o form for recarregado.
+*Observação:* O código que recarrega o form de entrada, caso nenhuma descrição tenha sido inserida, é incluído no <<_verifying_the_wisher_s_logon,código que valida os dados e insere-os no banco de dados>>. Esse código não é descrito nesta seção. O código desta seção preserva somente o valor de  `dueDate`  para que ele seja exibido se o form for recarregado.
 
 *Para reexibir o form de entrada depois que o usuário o envia sem êxito:*
 
-1. Digite ou cole o bloco de código seguinte dentro do elemento HTML <body> de  ``editWish.php`` , diretamente acima do form de entrada:
+1. Digite ou cole o bloco de código seguinte dentro do elemento HTML <body> de  `editWish.php` , diretamente acima do form de entrada:
 
 [source,php]
 ----
 
-<?php 
-if ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("description" => $_POST["wish"], "due_date" => $_POST["dueDate"]);else$wish = array("description" => "", "due_date" => "");
-?>  
+<?php
+if ($_SERVER['REQUEST_METHOD'] == "POST")
+    $wish = array("description" => $_POST['wish'],
+                        "due_date" => $_POST['dueDate']);
+else
+    $wish = array("description" => "",
+                        "due_date" => "");
+?>
 ----
 
-O código verifica qual método de Solicitação de Servidor foi usado para transferir os dados e cria um array chamado $wish. Se o método for POST, o que significa que o form de entrada é exibido depois de uma tentativa malsucedida de salvar um desejo com uma descrição vazia, os elementos  ``description``  e  ``due_date``  aceitam os valores transferidos pelo POST.
+O código verifica qual método de Solicitação de Servidor foi usado para transferir os dados e cria um array chamado $wish. Se o método for POST, o que significa que o form de entrada é exibido depois de uma tentativa malsucedida de salvar um desejo com uma descrição vazia, os elementos  `description`  e  `due_date`  aceitam os valores transferidos pelo POST.
 
-Se o método não for POST, o que significa que o form de entrada é exibido pela primeira vez depois do redirecionamento do form para a página  ``editWishList.php`` , os elementos  ``description``  e  ``due_date``  ficam vazios.
+Se o método não for POST, o que significa que o form de entrada é exibido pela primeira vez depois do redirecionamento do form para a página  `editWishList.php` , os elementos  `description`  e  `due_date`  ficam vazios.
 
-*Observação:* Em ambos os casos a descrição fica vazia. Há diferença apenas em  ``dueDate`` .
+*Observação:* Em ambos os casos a descrição fica vazia. Há diferença apenas em  `dueDate` .
 
-2. Atualize o form Adicionar Desejo para que os valores de seus campos de entrada sejam recuperados do array  ``$wish`` . Substitua as linhas no form Adicionar Desejo:
+2. Atualize o form Adicionar Desejo para que os valores de seus campos de entrada sejam recuperados do array  `$wish` . Substitua as linhas no form Adicionar Desejo:
 
-[source,java]
+[source,php]
 ----
 
 Describe your wish: <input type="text" name="wish"  value="" /><br/>
@@ -223,13 +226,13 @@
 When do you want to get it? <input type="text" name="dueDate" value="<?php echo $wish['due_date']; ?>"/><br/>
 ----
 
-
+[[_verifying_the_wisher_s_logon]]
 == Verificando o Log-in do Wisher
 
-No arquivo  ``editWish.php`` , insira o seguinte código de manipulação de sessão dentro do bloco <? php?> na parte superior do arquivo:
+No arquivo  `editWish.php` , insira o seguinte código de manipulação de sessão dentro do bloco <? php?> na parte superior do arquivo:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -253,10 +256,10 @@
 
 Depois que o usuário envia um novo desejo, a aplicação precisa adicionar o desejo ao banco de dados "desejos". Para ativar essa funcionalidade, adicione o seguinte código à aplicação:
 
-* Adicione mais duas funções auxiliares à classe  ``WishDB``  em  ``db.php`` .
+* Adicione mais duas funções auxiliares à classe  `WishDB`  em  `db.php` .
 * Uma função adiciona um novo registro à tabela de desejos.
 * A outra função converte as datas para o formato aceito pelo servidor de bancos de dados MySQL.
-* Adicione o código ao  ``editWish.php`` , que usará as novas funções auxiliares em  ``WishDB``  para inserir o novo desejo no banco de dados.
+* Adicione o código ao  `editWish.php` , que usará as novas funções auxiliares em  `WishDB`  para inserir o novo desejo no banco de dados.
 
 
 [[add-insert-wish]]
@@ -264,33 +267,40 @@
 
 Essa função requer o wisher ID, uma descrição do novo desejo e a data de vencimento do desejo como parâmetros de entrada e insere esses dados no banco de dados em um novo registro. A função não retorna valores.
 
-Abra o  ``db.php ``  e adicione a função  ``insert_wish``  na classe  ``WishDB `` :
+Abra o  `db.php `  e adicione a função  `insert_wish`  na classe  `WishDB ` :
 
 *Para o banco de dados MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-function insert_wish($wisherID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($this->format_date_for_sql($duedate)==null){$this->query("INSERT INTO wishes (wisher_id, description)" ." VALUES (" . $wisherID . ", '" . $description . "')");} else$this->query("INSERT INTO wishes (wisher_id, description, due_date)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ")");
+function insert_wish($wisherID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($this->format_date_for_sql($duedate)==null){
+       $this->query("INSERT INTO wishes (wisher_id, description)" .
+            " VALUES (" . $wisherID . ", '" . $description . "')");
+    } else
+        $this->query("INSERT INTO wishes (wisher_id, description, due_date)" .
+            " VALUES (" . $wisherID . ", '" . $description . "', "
+            . $this->format_date_for_sql($duedate) . ")");
 }
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 function insert_wish($wisherID, $description, $duedate) {
-  $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))"; 
-  $stid = oci_parse($this->con, $query);
-  oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
-  oci_bind_by_name($stid, ':desc_bv', $description);
-  oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
-  oci_execute($stid);
-  oci_free_statement($stid);
+    $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))";
+    $stid = oci_parse($this->con, $query);
+    oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
+    oci_bind_by_name($stid, ':desc_bv', $description);
+    oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
+    oci_execute($stid);
+    oci_free_statement($stid);
 }
 ----
 
@@ -300,90 +310,96 @@
 [[add-format-date-for-sql]]
 === Adicionando a função format_date_for_sql ao WishDB
 
-Adicione a função  ``format_date_for_sql``  à classe  ``WishDB``  em  ``db.php`` . A função exige uma string com uma data como parâmetro de entrada. A função retorna uma data no formato que pode ser processado pelo servidor de banco de dados ou  ``null``  se a string de entrada estiver vazia.
+Adicione a função  `format_date_for_sql`  à classe  `WishDB`  em  `db.php` . A função exige uma string com uma data como parâmetro de entrada. A função retorna uma data no formato que pode ser processado pelo servidor de banco de dados ou  `null`  se a string de entrada estiver vazia.
 
-*Observação:* a função nesse exemplo usa a função  ``date_parse``  PHP. Essa função funciona apenas com datas em Inglês, como December 25, 2010 e apenas com algarismos arábicos. Um site profissional deve usar um selecionador de data.
+*Observação:* a função nesse exemplo usa a função  `date_parse`  PHP. Essa função funciona apenas com datas em Inglês, como December 25, 2010 e apenas com algarismos arábicos. Um site profissional deve usar um selecionador de data.
 
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){if ($date == "")return null;else {$dateParts = date_parse($date);return $dateParts["year"]*10000 + $dateParts["month"]*100 + $dateParts["day"];}}
+function format_date_for_sql($date) {
+    if ($date == "")
+        return null;
+    else {
+        $dateParts = date_parse($date);
+        return $dateParts["year"] * 10000 + $dateParts["month"] * 100 + $dateParts["day"];
+    }
+}
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){
+function format_date_for_sql($date) {
     if ($date == "")
         return null;
     else {
         $dateParts = date_parse($date);
-        return $dateParts['year']*10000 + '-' + $dateParts['month']*100 + '-' + $dateParts['day'];
-   }
+        return $dateParts['year'] * 10000 + '-' + $dateParts['month'] * 100 + '-' + $dateParts['day'];
+    }
 }
 ----
 
-Se a string de entrada estiver vazia, o código retorna NULL (nulo). Caso contrário, a função  ``date_parse``  interna é chamada com  ``$date``  como parâmetro de entrada. A função  ``date_parse``  retorna um array que consiste em três elementos chamados  ``$dateParts["ano"]`` ,  ``$dateParts["mês"]``  e  ``$dateParts["dia"]`` . A string de saída final é construída com base nos elementos do array  ``$dateParts`` .
+Se a string de entrada estiver vazia, o código retorna NULL (nulo). Caso contrário, a função  `date_parse`  interna é chamada com  `$date`  como parâmetro de entrada. A função  `date_parse`  retorna um array que consiste em três elementos chamados  `$dateParts["ano"]` ,  `$dateParts["mês"]`  e  `$dateParts["dia"]` . A string de saída final é construída com base nos elementos do array  `$dateParts` .
 
-*Importante:* a função  ``date_parse``  reconhece apenas datas em Inglês. Por exemplo, faz parsing para "February 2, 2016" mas não para "2 Unora, 2016".
+*Importante:* a função  `date_parse`  reconhece apenas datas em Inglês. Por exemplo, faz parsing para "February 2, 2016" mas não para "2 Unora, 2016".
 
-*Observação para usuários do banco de dados Oracle: * o único formato necessário é que o formato da data na instrução  ``return $dateParts...``  coincida com o formato da data na função SQL  ``to_date``  na consulta  ``insert_wish`` .
+*Observação para usuários do banco de dados Oracle: * o único formato necessário é que o formato da data na instrução  `return $dateParts...`  coincida com o formato da data na função SQL  `to_date`  na consulta  `insert_wish` .
 
 
 [[validateAndEnterWishToDatabase]]
 === Inserindo o Registro do Novo Desejo no Banco de Dados
 
-Agora que você desenvolveu as funções auxiliares, adicione o código para validar os novos dados do desejo e insira os dados para o banco de dados, se eles forem válidos. Se os dados não forem válidos, o código deve recarregar o form Adicionar Desejo. Se os dados forem inválidos porque nenhuma descrição foi inserida, mas existe uma data de vencimento, a data de vencimento é salva e reexibida quando o form é recarregado, graças ao código que você <<inputFormAfterunsuccessfulSave,desenvolveu anteriormente>>.
+Agora que você desenvolveu as funções auxiliares, adicione o código para validar os novos dados do desejo e insira os dados para o banco de dados, se eles forem válidos. Se os dados não forem válidos, o código deve recarregar o form Adicionar Desejo. Se os dados forem inválidos porque nenhuma descrição foi inserida, mas existe uma data de vencimento, a data de vencimento é salva e reexibida quando o form é recarregado, graças ao código que você <<_returning_to_the_front_index_php_page,desenvolveu anteriormente>>.
 
-Insira o código seguinte no bloco <? php?> de  ``editWish.php`` , abaixo do código de tratamento de sessão:
+Insira o código seguinte no bloco <? php?> de  `editWish.php` , abaixo do código de tratamento de sessão:
 
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
 
-    $wishDescriptionIsEmpty = false;
-    if ($_SERVER['REQUEST_METHOD'] == "POST"){
-        if (array_key_exists("back", $_POST)) {
-           header('Location: editWishList.php' ); 
-           exit;
-        } else
-        if ($_POST['wish'] == "") {
-            $wishDescriptionIsEmpty =  true;
-        } 
-		 else {
-           WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
-           header('Location: editWishList.php' );
-           exit;
-        }
+$wishDescriptionIsEmpty = false;
+if ($_SERVER['REQUEST_METHOD'] == "POST"){
+    if (array_key_exists("back", $_POST)) {
+        header('Location: editWishList.php' ); 
+        exit;
+    } else
+    if ($_POST['wish'] == "") {
+        $wishDescriptionIsEmpty =  true;
+    } else {
+        WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
+        header('Location: editWishList.php' );
+        exit;
     }
-	
+}
+  
 ----
 
 O código realiza as seguintes funções:
 
-* Permite o uso do arquivo  ``db.php`` 
-* Obtém ou cria uma instância da classe  ``WishDB`` 
-* Recupera o wisher ID que está tentando adicionar um desejo chamando a função  ``get_wisher_id_by_name`` 
-* Inicializa o flag  ``$wishDescriptionIsEmpty`` , que será usado mais tarde para mostrar mensagens de erro.
-* Verifica se o método de Solicitação é POST, o que significa que os dados foram enviados do form para inserir os dados do desejo na própria página  ``editWish.php`` .
-* Verifica se o array  ``$_POST``  contém um elemento com a chave "back"
+* Permite o uso do arquivo  `db.php` 
+* Obtém ou cria uma instância da classe  `WishDB` 
+* Recupera o wisher ID que está tentando adicionar um desejo chamando a função  `get_wisher_id_by_name` 
+* Inicializa o flag  `$wishDescriptionIsEmpty` , que será usado mais tarde para mostrar mensagens de erro.
+* Verifica se o método de Solicitação é POST, o que significa que os dados foram enviados do form para inserir os dados do desejo na própria página  `editWish.php` .
+* Verifica se o array  `$_POST`  contém um elemento com a chave "back"
 
-Se o array  ``$_POST``  contém um elemento com a chave "back", o botão Voltar à Lista foi pressionado antes de o form ser enviado. Nesse caso, o código redireciona o usuário para o  ``editWishList.php``  sem salvar os dados que foram inseridos nos campos e para o processamento de PHP.
+Se o array  `$_POST`  contém um elemento com a chave "back", o botão Voltar à Lista foi pressionado antes de o form ser enviado. Nesse caso, o código redireciona o usuário para o  `editWishList.php`  sem salvar os dados que foram inseridos nos campos e para o processamento de PHP.
 
 Se o array $_POST _não_ contiver um elemento com a chave "back", é porque os dados foram enviados quando o botão Salvar Alterações foi pressionado. Nesse caso, o código valida se a descrição do desejo está preenchida. O código faz isso, verificando se o elemento com a chave "wish" no array $_POST está vazio e, se a chave estiver vazia, altera o flag $wishDescriptionIsEmpty para verdadeiro. Observe que como nenhum código adicional é executado no bloco PHP, o form Adicionar Desejo é recarregado.
 
-Se o botão Voltar à Lista não foi pressionado e a descrição do desejo foi preenchida, o código chama a função  ``insert_wish``  com o wisher ID e a data de vencimento do desejo como os parâmetros de entrada. Em seguida, o código redireciona o usuário para a página  ``editWishList.php``  e para o processamento de PHP.
+Se o botão Voltar à Lista não foi pressionado e a descrição do desejo foi preenchida, o código chama a função  `insert_wish`  com o wisher ID e a data de vencimento do desejo como os parâmetros de entrada. Em seguida, o código redireciona o usuário para a página  `editWishList.php`  e para o processamento de PHP.
 
-
+[[_displaying_error_messages]]
 === Exibindo Mensagens de Erro
 
 Se o usuário tentar salvar um desejo mas não tiver inserido uma descrição para ele, deve ser exibida uma mensagem de erro.
@@ -393,16 +409,19 @@
 [source,php]
 ----
 
-<?phpif ($wishDescriptionIsEmpty) echo "Please enter description<br/>";?>
+<?php
+if ($wishDescriptionIsEmpty)
+    echo "Please enter description<br/>";
+?>
 ----
 
-A mensagem de erro será exibida se o flag  ``$wishDescriptionIsEmpty``  for verdadeira. O flag será processado durante a validação do form de entrada.
+A mensagem de erro será exibida se o flag  `$wishDescriptionIsEmpty`  for verdadeira. O flag será processado durante a validação do form de entrada.
 
-
+[[_returning_to_the_front_index_php_page]]
 == Retornando à Página Inicial index.php
 
 O usuário deve poder retornar à página inicial da aplicação a qualquer momento pressionando um botão. 
-Para implementar essa funcionalidade, insira o seguinte form de entrada HTML no arquivo  ``editWishList.php`` , antes da tag de fechamento </body>:
+Para implementar essa funcionalidade, insira o seguinte form de entrada HTML no arquivo  `editWishList.php` , antes da tag de fechamento </body>:
 
 
 [source,xml]
@@ -413,30 +432,34 @@
 
 O form redireciona o usuário para a página inicial index.php quando o botão Voltar à Página Principal é pressionado.
 
-
+[[_testing_the_add_wish_functionality]]
 == Testando a Funcionalidade Adicionar Desejo
 
-1. Execute a aplicação. Na página  ``index.php`` , preencha os campos: no campo Nome do Usuário, insira "Tom", e no campo Senha, insira "tomcat".
+1. Execute a aplicação. Na página  `index.php` , preencha os campos: no campo Nome do Usuário, insira "Tom", e no campo Senha, insira "tomcat".
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. Pressione o botão Editar Minha Lista de Desejos. A página  ``editWishList.php``  abre. 
+
+2. Pressione o botão Editar Minha Lista de Desejos. A página  `editWishList.php`  abre. 
 image::images/edit-wish-list-add-wish.png[]
-3. Pressione o botão Voltar à Página Principal. A página  ``index.php``  abre.
-4. Faça log-in como Tom e pressione o botão Editar Minha Lista de Desejos novamente. A página  ``editWishList.php``  abre.
-5. Pressione o botão Adicionar Desejo. A página  ``editWish.php``  abre. Preencha o form.
+3. Pressione o botão Voltar à Página Principal. A página  `index.php`  abre.
+4. Faça log-in como Tom e pressione o botão Editar Minha Lista de Desejos novamente. A página  `editWishList.php`  abre.
+5. Pressione o botão Adicionar Desejo. A página  `editWish.php`  abre. Preencha o form.
+
 image::images/new-wish.png[] 
-Pressione o botão Voltar à Lista. A página  ``editWishList.php``  abre, mas o desejo inserido não foi adicionado.
-6. Pressione o botão Adicionar Desejo novamente. A página  ``editWish.php``  abre. Preencha a data de vencimento e deixe a descrição vazia. Pressione o botão Salvar Alterações. A página  ``editWish.php``  exibe o form de entrada com uma mensagem de erro e a data de vencimento preenchida.
-7. Pressione o botão Adicionar Desejo novamente. A página  ``editWish.php``  abre. Preencha o form e pressione o botão Salvar Alterações. A página  ``editWishList.php``  mostra uma lista de desejos atualizada. 
+
+Pressione o botão Voltar à Lista. A página  `editWishList.php`  abre, mas o desejo inserido não foi adicionado.
+6. Pressione o botão Adicionar Desejo novamente. A página  `editWish.php`  abre. Preencha a data de vencimento e deixe a descrição vazia. Pressione o botão Salvar Alterações. A página  `editWish.php`  exibe o form de entrada com uma mensagem de erro e a data de vencimento preenchida.
+7. Pressione o botão Adicionar Desejo novamente. A página  `editWish.php`  abre. Preencha o form e pressione o botão Salvar Alterações. A página  `editWishList.php`  mostra uma lista de desejos atualizada. 
 image::images/edit-wish-list-updated.png[]
 
-
+[[_application_source_code_after_the_current_lesson_is_completed]]
 == O código-fonte da Aplicação após a Lição Atual está Concluído
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição estiver concluída.
 
 Usuários do banco de dados Oracle: clique link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição for concluída.
 
-
+[[_next_steps]]
 == Próximas Etapas
 
 link:wish-list-lesson5.html[+<< Lição anterior+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ru.asciidoc
index 6ea2521..a5db041 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_ru.asciidoc
@@ -42,57 +42,35 @@
 :keywords: Apache NetBeans, Tutorials, Урок 6. Добавление нового пожелания в базу данных
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. 
-link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. 
-*=> Добавление нового пожелания в базу данных*
-
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В этом уроке функциональные возможности приложения будут расширены двумя компонентами:
 
 
-Для реализации этих функциональных возможностей следует изменить файл  ``editWishList.php``  и создать новый файл  ``editWish.php`` .
+Для реализации этих функциональных возможностей следует изменить файл  `editWishList.php`  и создать новый файл  `editWish.php` .
 
 image::images/page-flow-diagram-l6.png[]
 
 Текущий документ является частью краткого учебного курса link:wish-list-tutorial-main-page.html[+Создание приложения CRUD в IDE NetBeans для PHP+].
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == Исходный код приложения из предыдущего урока
 
 Для пользователей MySQL: щелкните link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+ здесь+], чтобы загрузить исходный код, отражающий состояние проекта после завершения предыдущего урока.
 
 Для пользователей баз данных Oracle: перейдите по link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+этой+] для загрузки исходного кода, описывающего состояние проекта на момент завершения предыдущего урока.
 
-
+[[_submitting_a_new_wish]]
 == Отправка нового пожелания
 
 Пользователь выполняет отправку нового пожелания путем выполнения следующих действий:
 
-1. Пользователь входит в систему, переключается на страницу  ``editWishList.php``  и нажимает кнопку "Add Wish". Откроется страница  ``editWish.php`` , на которой отображается форма HTML.
+1. Пользователь входит в систему, переключается на страницу  `editWishList.php`  и нажимает кнопку "Add Wish". Откроется страница  `editWish.php` , на которой отображается форма HTML.
 2. В форме HTML пользователь вводит описание пожелания и, возможно, дату, до наступления которой пожелание должно быть выполнено, а затем нажимает кнопку "Save Changes".
 3. Если форма отправляется без описания пожелания, то выполняется возврат к этой же форме для повторной попытки ввода. Если пользователь указал срок выполнения пожелания, но не ввел описание, то при перезагрузке формы эти данные вновь отображаются.
 
 Для предоставления пользователю возможности использования этой процедуры необходимо добавить к приложению следующие функциональные возможности:
 
-* <<add-wish-ui-elements,Компоненты интерфейса пользователя>>, состоящие из формы HTML для добавления пожелания и кнопки на странице  ``editWishList.php `` , перенаправляющей пользователя в форму.
+* <<add-wish-ui-elements,Компоненты интерфейса пользователя>>, состоящие из формы HTML для добавления пожелания и кнопки на странице  `editWishList.php ` , перенаправляющей пользователя в форму.
 * Код для <<inputFormAfterunsuccessfulSave,повторного отображения срока выполнения>>, если была отправлена неполная форма.
 
 
@@ -101,7 +79,7 @@
 
 *Для реализации функции добавления нового пожелания выполните следующее:*
 
-1. Создайте кнопку "Add Wish". В файле  ``editWishList.php``  ниже блока PHP добавьте следующий код HTML.
+1. Создайте кнопку "Add Wish". В файле  `editWishList.php`  ниже блока PHP добавьте следующий код HTML.
 
 [source,xml]
 ----
@@ -109,8 +87,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
     <head>
-
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
         <form name="addNewWish" action="editWish.php">            
@@ -120,19 +97,31 @@
 </html>
 ----
 
-*Примечание. *Можно пропустить предупреждения от средства проверки HTML.
+*Примечание.* Можно пропустить предупреждения от средства проверки HTML.
 
-Форма содержит поле ввода "Add Wish" типа  ``submit`` . Это поле реализует кнопку "Add Wish". При нажатии кнопки "Add Wish" пользователь перенаправляется на страницу  ``editWish.php`` . Метод запроса к серверу не используется, т.к. данные посредством этой формы не передаются.
+Форма содержит поле ввода "Add Wish" типа  `submit` . Это поле реализует кнопку "Add Wish". При нажатии кнопки "Add Wish" пользователь перенаправляется на страницу  `editWish.php` . Метод запроса к серверу не используется, т.к. данные посредством этой формы не передаются.
 
-2. Выше формы addNewWish добавьте таблицу, в которой отображаются пожелания данного лица. Этот код сходен с кодом  ``wishlist.php`` .
+2. Выше формы addNewWish добавьте таблицу, в которой отображаются пожелания данного лица. Этот код сходен с кодом  `wishlist.php` .
 
 *Для базы данных MySQL*
 
-
 [source,php]
 ----
 
-<table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row['description']) . "</td>";echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";}?></table>
+<table border="black">
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
+    <?php
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+        echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+</table>
 ----
 
 *Для базы данных Oracle*
@@ -142,18 +131,22 @@
 ----
 
 <table border="black">
-    <tr><th>Item</th><th>Due Date</th></tr>
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
     <?php
-    require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
-    while ($row = oci_fetch_array($stid)) {echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
+    while ($row = oci_fetch_array($stid)) {
+        echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";
+        echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
     }
+    oci_free_statement($stid);
     ?>
 </table>
 ----
-3. В папке исходных файлов создайте файл PHP  ``editWish.php`` .
-4. На станице  ``editWish.php``  реализуйте форму "Add Wish". Введите или вставьте следующий код под блоком <? php ? >:
+3. В папке исходных файлов создайте файл PHP  `editWish.php` .
+4. На станице  `editWish.php`  реализуйте форму "Add Wish". Введите или вставьте следующий код под блоком <? php ? >:
 
 [source,xml]
 ----
@@ -163,10 +156,14 @@
 <html>
     <head>
 
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
-        <form name="editWish" action="editWish.php" method="POST">Describe your wish: <input type="text" name="wish"  value="" /><br/>When do you want to get it? <input type="text" name="dueDate" value=""/><br/><input type="submit" name="saveWish" value="Save Changes"/><input type="submit" name="back" value="Back to the List"/>
+        <form name="editWish" action="editWish.php" method="POST">
+            Describe your wish: <input type="text" name="wish"  value="" /><br/>
+            When do you want to get it? <input type="text" name="dueDate" value=""/><br/>
+            <input type="submit" name="saveWish" value="Save Changes"/>
+            <input type="submit" name="back" value="Back to the List"/>
         </form>
     </body>
 </html> 
@@ -176,39 +173,44 @@
 
 * Два пустых текстовых поля для ввода пожелания и срока выполнения.
 * Текст, который будет напечатан рядом с полями ввода.
-* Поле  ``submit`` , представляющее кнопку "Save Changes"
-* Поле  ``submit`` , представляющее кнопку "Back to the List" для возврата к странице  ``editWishList.php`` 
+* Поле  `submit` , представляющее кнопку "Save Changes"
+* Поле  `submit` , представляющее кнопку "Back to the List" для возврата к странице  `editWishList.php` 
 
-После нажатия кнопки "Add Wish" форма отправляет введенные данные на ту же страницу  ``editWish.php``  с использованием метода "Request" "POST".
+После нажатия кнопки "Add Wish" форма отправляет введенные данные на ту же страницу  `editWish.php`  с использованием метода "Request" "POST".
 
-
+[[_redisplaying_the_due_date_after_an_unsuccessful_submission]]
 === Повторное отображение срока выполнения после неудавшейся отправки
 
-Если пользователь не указал описание в форме "Add Wish", то появится сообщение об ошибке, и будет выполнен возврат к странице  ``editWish.php`` . В случае возврата пользователя к странице  ``editWish.php``  в форме "Add Wish" должно отображаться значение  ``dueDate``  (если оно было до этого введено). В текущей реализации формы оба поля остаются пустыми. Для того чтобы введенные значения остались в полях, необходимо сохранить данные нового пожелания в массиве. Массив будет состоять из двух элементов с именами  ``description``  и  ``due_date`` . Затем следует изменить форму "Add Wish" таким образом, чтобы в нее из массива извлекалось значение поля  ``dueDate`` .
+Если пользователь не указал описание в форме "Add Wish", то появится сообщение об ошибке, и будет выполнен возврат к странице  `editWish.php` . В случае возврата пользователя к странице  `editWish.php`  в форме "Add Wish" должно отображаться значение  `dueDate`  (если оно было до этого введено). В текущей реализации формы оба поля остаются пустыми. Для того чтобы введенные значения остались в полях, необходимо сохранить данные нового пожелания в массиве. Массив будет состоять из двух элементов с именами  `description`  и  `due_date` . Затем следует изменить форму "Add Wish" таким образом, чтобы в нее из массива извлекалось значение поля  `dueDate` .
 
-*Примечание.* Код, перезагружающий форму ввода, если описание не введено в <<validateAndEnterWishToDatabase,код, проверяющий данные и вводит их в базу данных>>. Этот код не рассматривается в этом разделе. В соответствии с кодом в этом разделе значение  ``dueDate``  будет отображаться в поле в случае перезагрузки формы.
+*Примечание.* Код, перезагружающий форму ввода, если описание не введено в <<validateAndEnterWishToDatabase,код, проверяющий данные и вводит их в базу данных>>. Этот код не рассматривается в этом разделе. В соответствии с кодом в этом разделе значение  `dueDate`  будет отображаться в поле в случае перезагрузки формы.
 
 *Для обеспечения повторного вывода формы ввода после неудачной отправки формы пользователем необходимо выполнить следующее:*
 
-1. Введите или вставьте следующий блок кода в элемент HTML <body> на странице  ``editWish.php``  непосредственно над формой ввода:
+1. Введите или вставьте следующий блок кода в элемент HTML <body> на странице  `editWish.php`  непосредственно над формой ввода:
 
 [source,php]
 ----
 
-<?php 
-if ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("description" => $_POST["wish"], "due_date" => $_POST["dueDate"]);else$wish = array("description" => "", "due_date" => "");
-?>  
+<?php
+if ($_SERVER['REQUEST_METHOD'] == "POST")
+    $wish = array("description" => $_POST['wish'],
+                        "due_date" => $_POST['dueDate']);
+else
+    $wish = array("description" => "",
+                        "due_date" => "");
+?>
 ----
 
-В соответствии с кодом определяется тот метод "Request Server", который использовался для передачи данных, а также создается массив с именем $wish. Если использовался метод "POST" (что означает, что входная форма отображается после неудачной попытки сохранить пожелание с пустым описанием), то элементы  ``description``  и  ``due_date``  принимают значения, переданные с использованием метода "POST".
+В соответствии с кодом определяется тот метод "Request Server", который использовался для передачи данных, а также создается массив с именем $wish. Если использовался метод "POST" (что означает, что входная форма отображается после неудачной попытки сохранить пожелание с пустым описанием), то элементы  `description`  и  `due_date`  принимают значения, переданные с использованием метода "POST".
 
-Если использовался другой метод (что означает, что входная форма отображается впервые после переадресации со страницы  ``editWishList.php`` ), то элементы  ``description``  и  ``due_date``  являются пустыми.
+Если использовался другой метод (что означает, что входная форма отображается впервые после переадресации со страницы  `editWishList.php` ), то элементы  `description`  и  `due_date`  являются пустыми.
 
-*Примечание.*В любом случае описание пустое. Единственным отличием является  ``dueDate`` .
+*Примечание.*В любом случае описание пустое. Единственным отличием является  `dueDate` .
 
-2. Обновите форму "Add Wish" таким образом, чтобы значения ее полей ввода были извлечены из массива  ``$wish`` . Замените строки форме "Add Wish":
+2. Обновите форму "Add Wish" таким образом, чтобы значения ее полей ввода были извлечены из массива  `$wish` . Замените строки форме "Add Wish":
 
-[source,java]
+[source,php]
 ----
 
 Describe your wish: <input type="text" name="wish"  value="" /><br/>
@@ -223,13 +225,13 @@
 When do you want to get it? <input type="text" name="dueDate" value="<?php echo $wish['due_date']; ?>"/><br/>
 ----
 
-
+[[_verifying_the_wisher_s_logon]]
 == Проверка входа пользователя
 
-В файле  ``editWish.php``  введите следующий код обработки сеанса в блоке <? php ? > в начале файла:
+В файле  `editWish.php`  введите следующий код обработки сеанса в блоке <? php ? > в начале файла:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -253,10 +255,10 @@
 
 После подтверждения пользователем нового пожелания приложение добавляет пожелание к базе данных "Wishes". Для включения этой функциональной возможности вставьте в приложение следующий код:
 
-* Добавьте еще две дополнительных функции к классу  ``WishDB``  в  ``db.php`` .
+* Добавьте еще две дополнительных функции к классу  `WishDB`  в  `db.php` .
 * Первая функция добавляет новую запись в таблицу пожеланий.
 * Вторая функция преобразовывает даты в формат, поддерживаемый сервером баз данных MySQL.
-* Добавьте к  ``editWish.php``  код, который будет использовать новые вспомогательные функции в  ``WishDB``  для ввода нового пожелания в базу данных.
+* Добавьте к  `editWish.php`  код, который будет использовать новые вспомогательные функции в  `WishDB`  для ввода нового пожелания в базу данных.
 
 
 [[add-insert-wish]]
@@ -264,33 +266,40 @@
 
 Эта функция требует в качестве входных параметров идентификатор пользователя, описание нового пожелания и срок выполнения пожелания, после чего добавляет эти данные к базе данных как новую запись. Функция не возвращает какого-либо значения.
 
-Откройте  ``db.php ``  и добавьте функцию  ``insert_wish``  в класс  ``WishDB`` .
+Откройте  `db.php `  и добавьте функцию  `insert_wish`  в класс  `WishDB` .
 
 *Для базы данных MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-function insert_wish($wisherID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($this->format_date_for_sql($duedate)==null){$this->query("INSERT INTO wishes (wisher_id, description)" ." VALUES (" . $wisherID . ", '" . $description . "')");} else$this->query("INSERT INTO wishes (wisher_id, description, due_date)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ")");
+function insert_wish($wisherID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($this->format_date_for_sql($duedate)==null){
+       $this->query("INSERT INTO wishes (wisher_id, description)" .
+            " VALUES (" . $wisherID . ", '" . $description . "')");
+    } else
+        $this->query("INSERT INTO wishes (wisher_id, description, due_date)" .
+            " VALUES (" . $wisherID . ", '" . $description . "', "
+            . $this->format_date_for_sql($duedate) . ")");
 }
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 function insert_wish($wisherID, $description, $duedate) {
-  $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))"; 
-  $stid = oci_parse($this->con, $query);
-  oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
-  oci_bind_by_name($stid, ':desc_bv', $description);
-  oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
-  oci_execute($stid);
-  oci_free_statement($stid);
+    $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))";
+    $stid = oci_parse($this->con, $query);
+    oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
+    oci_bind_by_name($stid, ':desc_bv', $description);
+    oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
+    oci_execute($stid);
+    oci_free_statement($stid);
 }
 ----
 
@@ -300,40 +309,47 @@
 [[add-format-date-for-sql]]
 === Добавление функции format_date_for_sql в класс WishDB
 
-В файле  ``db.php``  добавьте в класс  ``WishDB``  функцию  ``format_date_for_sql`` . Для выполнения функции качестве входного параметра требуется строка, в которой указана дата. Эта функция возвращает дату в формате, который может быть обработан сервером базы данных, или  ``null`` , если входная строка пустая.
+В файле  `db.php`  добавьте в класс  `WishDB`  функцию  `format_date_for_sql` . Для выполнения функции качестве входного параметра требуется строка, в которой указана дата. Эта функция возвращает дату в формате, который может быть обработан сервером базы данных, или  `null` , если входная строка пустая.
 
-*Примечание.* Функция в этом примере использует функцию PHP  ``date_parse`` . Эта функция работает только с англоязычными датами, такими как "December 25, 2010", и только с арабскими цифрами. На профессиональном веб-сайте следует использовать управляющий элемент выбора даты.
+*Примечание.* Функция в этом примере использует функцию PHP  `date_parse` . Эта функция работает только с англоязычными датами, такими как "December 25, 2010", и только с арабскими цифрами. На профессиональном веб-сайте следует использовать управляющий элемент выбора даты.
 
 *Для базы данных MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){if ($date == "")return null;else {$dateParts = date_parse($date);return $dateParts["year"]*10000 + $dateParts["month"]*100 + $dateParts["day"];}}
+function format_date_for_sql($date) {
+    if ($date == "")
+        return null;
+    else {
+        $dateParts = date_parse($date);
+        return $dateParts["year"] * 10000 + $dateParts["month"] * 100 + $dateParts["day"];
+    }
+}
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){
+function format_date_for_sql($date) {
     if ($date == "")
         return null;
     else {
         $dateParts = date_parse($date);
-        return $dateParts['year']*10000 + '-' + $dateParts['month']*100 + '-' + $dateParts['day'];
-   }
+        return $dateParts['year'] * 10000 + '-' + $dateParts['month'] * 100 + '-' + $dateParts['day'];
+    }
 }
 ----
 
-При пустой входной строке код возвращает значение "NULL". В противном случае внутренняя функция  ``date_parse``  вызывается с входным параметром  ``$date`` . Функция  ``date_parse``  возвращает массив, состоящий из трех элементов с именами  ``$dateParts["year"]`` ,  ``$dateParts["month"]``  и  ``$dateParts["day"]`` . Окончательная строка вывода создается из элементов массива  ``$dateParts`` .
+При пустой входной строке код возвращает значение "NULL". В противном случае внутренняя функция  `date_parse`  вызывается с входным параметром  `$date` . Функция  `date_parse`  возвращает массив, состоящий из трех элементов с именами  `$dateParts["year"]` ,  `$dateParts["month"]`  и  `$dateParts["day"]` . Окончательная строка вывода создается из элементов массива  `$dateParts` .
 
-*Важно!* Функция  ``date_parse``  распознает только англоязычные даты. Например, она воспринимает и интерпретирует дату "February 2, 2016" но не дату "2 Unora, 2016".
+*Важно!* Функция  `date_parse`  распознает только англоязычные даты. Например, она воспринимает и интерпретирует дату "February 2, 2016" но не дату "2 Unora, 2016".
 
-*Примечание для пользователей базы данных Oracle.* Единственное требование, предъявляемое к формату, состоит в том, что формат даты в операторе  ``return $dateParts...``  должен совпадать с форматом даты в функции SQL  ``to_date``  из запроса  ``insert_wish`` .
+*Примечание для пользователей базы данных Oracle.* Единственное требование, предъявляемое к формату, состоит в том, что формат даты в операторе  `return $dateParts...`  должен совпадать с форматом даты в функции SQL  `to_date`  из запроса  `insert_wish` .
 
 
 [[validateAndEnterWishToDatabase]]
@@ -341,49 +357,48 @@
 
 На этом этапе, после окончания разработки дополнительных функций, добавьте код для проверки допустимости данных нового пожелания и ввода данных в базу данных при их корректности. Если данные некорректны, то должна быть выполнена перезагрузка формы "Add Wish". Если данные некорректны, поскольку отсутствует описание пожелания, но при этом указан срок выполнения пожелания, введенные данные сохраняются в поле и отображаются в случае перезагрузке формы благодаря <<inputFormAfterunsuccessfulSave,предварительно написанному >>коду.
 
-В верхний блок <? php ? > файла  ``editWish.php``  введите ниже кода обработки сеанса следующий код.
+В верхний блок <? php ? > файла  `editWish.php`  введите ниже кода обработки сеанса следующий код.
 
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
 
-    $wishDescriptionIsEmpty = false;
-    if ($_SERVER['REQUEST_METHOD'] == "POST"){
-        if (array_key_exists("back", $_POST)) {
-           header('Location: editWishList.php' ); 
-           exit;
-        } else
-        if ($_POST['wish'] == "") {
-            $wishDescriptionIsEmpty =  true;
-        } 
-		 else {
-           WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
-           header('Location: editWishList.php' );
-           exit;
-        }
+$wishDescriptionIsEmpty = false;
+if ($_SERVER['REQUEST_METHOD'] == "POST"){
+    if (array_key_exists("back", $_POST)) {
+        header('Location: editWishList.php' ); 
+        exit;
+    } else
+    if ($_POST['wish'] == "") {
+        $wishDescriptionIsEmpty =  true;
+    } else {
+        WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
+        header('Location: editWishList.php' );
+        exit;
     }
-	
+}
+  
 ----
 
 Код выполняет следующие функции:
 
-* активация использования файла  ``db.php`` ;
-* получение или создание экземпляра класса  ``WishDB`` ;
-* извлечение идентификатора пользователя, осуществляющего попытку добавления пожелания путем вызова функции  ``get_wisher_id_by_name`` ;
-* инициализация флага  ``$wishDescriptionIsEmpty`` , который будет использован позже для отображения сообщений об ошибках;
-* проверка того, что используется метод запроса "POST" (соответствует передаче данных из формы для ввода данных пожелания непосредственно на странице  ``editWish.php`` );
-* проверка того, содержит ли массив  ``$_POST``  элемент с ключом "back".
+* активация использования файла  `db.php` ;
+* получение или создание экземпляра класса  `WishDB` ;
+* извлечение идентификатора пользователя, осуществляющего попытку добавления пожелания путем вызова функции  `get_wisher_id_by_name` ;
+* инициализация флага  `$wishDescriptionIsEmpty` , который будет использован позже для отображения сообщений об ошибках;
+* проверка того, что используется метод запроса "POST" (соответствует передаче данных из формы для ввода данных пожелания непосредственно на странице  `editWish.php` );
+* проверка того, содержит ли массив  `$_POST`  элемент с ключом "back".
 
-Если массив  ``$_POST``  содержит элемент с ключом "back", то перед передачей формы была нажата кнопка "Back to the List". В этом случае осуществляется перенаправление на страницу  ``editWishList.php``  без сохранения данных, введенных в полях, и прекращается обработка блока PHP.
+Если массив  `$_POST`  содержит элемент с ключом "back", то перед передачей формы была нажата кнопка "Back to the List". В этом случае осуществляется перенаправление на страницу  `editWishList.php`  без сохранения данных, введенных в полях, и прекращается обработка блока PHP.
 
 Если массив $_POST _не_ содержит элемент с ключом "back", то данные были переданы путем нажатия кнопки "Save Changes". В этом случае в соответствии с кодом выполняется проверка наличия описания пожелания. Это реализуется путем проверки того, является ли элемент с ключом "wish" в массиве "$_POST" пустым. Если ключ пуст, значение флага $wishDescriptionIsEmpty изменяется на "true". Следует отметить, что если выполнение дальнейшего кода в блоке PHP прерывается, форма "Add Wish" перезагружается.
 
-Если не была нажата кнопка "Back to the List", но при этом указано описание пожелания, то код вызывает функцию  ``insert_wish``  с идентификатором пользователя, описанием и сроком выполнения пожелания в качестве входных параметров. Затем код перенаправляет пользователя на страницу  ``editWishList.php``  и прекращает обработку PHP.
+Если не была нажата кнопка "Back to the List", но при этом указано описание пожелания, то код вызывает функцию  `insert_wish`  с идентификатором пользователя, описанием и сроком выполнения пожелания в качестве входных параметров. Затем код перенаправляет пользователя на страницу  `editWishList.php`  и прекращает обработку PHP.
 
-
+[[_displaying_error_messages]]
 === Отображение сообщений об ошибках
 
 При попытке пользователя сохранить пожелание без описания должно отобразиться сообщение об ошибке.
@@ -393,16 +408,19 @@
 [source,php]
 ----
 
-<?phpif ($wishDescriptionIsEmpty) echo "Please enter description<br/>";?>
+<?php
+if ($wishDescriptionIsEmpty)
+    echo "Please enter description<br/>";
+?>
 ----
 
-Сообщение об ошибке отображается в случае значения "true" для флага  ``$wishDescriptionIsEmpty`` . Флаг обрабатывается в течение проверки допустимости формы ввода.
+Сообщение об ошибке отображается в случае значения "true" для флага  `$wishDescriptionIsEmpty` . Флаг обрабатывается в течение проверки допустимости формы ввода.
 
-
+[[_returning_to_the_front_index_php_page]]
 == Возврат к первой странице "index.php"
 
 Пользователь должен иметь возможность, нажав кнопку, в любой момент вернуться на первую страницу приложения. 
-Для реализации этих функции введите следующую форму ввода HTML в файл  ``editWishList.php``  перед закрывающим тегом </body>:
+Для реализации этих функции введите следующую форму ввода HTML в файл  `editWishList.php`  перед закрывающим тегом </body>:
 
 
 [source,xml]
@@ -411,32 +429,37 @@
 <form name="backToMainPage" action="index.php"><input type="submit" value="Back To Main Page"/></form>
 ----
 
+
 Форма перенаправляет пользователя на первую страницу "index.php" после нажатия кнопки "Back to Main Page".
 
-
+[[_testing_the_add_wish_functionality]]
 == Тестирование функциональной возможности добавления пожелания
 
-1. Запустите приложение. На странице  ``index.php``  заполните следующие поля: в поле "Username" введите "Tom", в поле "Password" введите "tomcat".
+1. Запустите приложение. На странице  `index.php`  заполните следующие поля: в поле "Username" введите "Tom", в поле "Password" введите "tomcat".
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. Нажмите кнопку "Edit My Wish List". Откроется страница  ``editWishList.php`` . 
+
+2. Нажмите кнопку "Edit My Wish List". Откроется страница  `editWishList.php` . 
 image::images/edit-wish-list-add-wish.png[]
-3. Нажмите кнопку "Back to Main Page". Откроется страница  ``index.php`` .
-4. Войдите в систему под именем "Tom" и снова нажмите кнопку "Edit My Wish List". Откроется страница  ``editWishList.php`` .
-5. Нажмите кнопку "Add Wish". Откроется страница  ``editWish.php`` . Заполните форму.
+3. Нажмите кнопку "Back to Main Page". Откроется страница  `index.php` .
+4. Войдите в систему под именем "Tom" и снова нажмите кнопку "Edit My Wish List". Откроется страница  `editWishList.php` .
+5. Нажмите кнопку "Add Wish". Откроется страница  `editWish.php` . Заполните форму.
+
 image::images/new-wish.png[] 
-Нажмите кнопку "Back to the List". Откроется страница  ``editWishList.php`` , но новое пожелание в списке отсутствует.
-6. Снова нажмите кнопку "Add Wish". Откроется страница  ``editWish.php`` . Укажите срок выполнения пожелания, а поле описания оставьте пустым. Нажмите кнопку "Save Changes". На странице  ``editWish.php``  отображается форма ввода с сообщением об ошибке и заполненным полем срока выполнения пожелания.
-7. Снова нажмите кнопку "Add Wish". Откроется страница  ``editWish.php`` . Заполните форму и нажмите кнопку "Save Changes". На странице  ``editWishList.php``  отображается обновленный список пожеланий. 
+
+Нажмите кнопку "Back to the List". Откроется страница  `editWishList.php` , но новое пожелание в списке отсутствует.
+6. Снова нажмите кнопку "Add Wish". Откроется страница  `editWish.php` . Укажите срок выполнения пожелания, а поле описания оставьте пустым. Нажмите кнопку "Save Changes". На странице  `editWish.php`  отображается форма ввода с сообщением об ошибке и заполненным полем срока выполнения пожелания.
+7. Снова нажмите кнопку "Add Wish". Откроется страница  `editWish.php` . Заполните форму и нажмите кнопку "Save Changes". На странице  `editWishList.php`  отображается обновленный список пожеланий. 
 image::images/edit-wish-list-updated.png[]
 
-
+[[_application_source_code_after_the_current_lesson_is_completed]]
 == Исходный код приложения на момент завершения текущего урока
 
 Для пользователей MySQL: щелкните link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+здесь+] для загрузки исходного кода, отражающего состояние проекта по завершении данного урока.
 
 Для пользователей Oracle Database: щелкните link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+здесь+] для загрузки исходного кода, отражающего состояние проекта по завершении данного урока.
 
-
+[[_next_steps]]
 == Что дальше?
 
 link:wish-list-lesson5.html[+<<Предыдущий урок+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_zh_CN.asciidoc
index 091406c..f5ffb92 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson6_zh_CN.asciidoc
@@ -43,57 +43,36 @@
 
 
 
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. 
-link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. 
-*=> 在数据库中添加新的愿望*
-
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 在本课中,将使用以下两个功能扩展应用程序功能:
 
 
-要实现该功能,请编辑  ``editWishList.php``  文件并创建新文件  ``editWish.php`` 。
+要实现该功能,请编辑  `editWishList.php`  文件并创建新文件  `editWish.php` 。
 
 image::images/page-flow-diagram-l6.png[]
 
 当前文档是link:wish-list-tutorial-main-page.html[+在适用于 PHP 的 NetBeans IDE 中创建 CRUD 应用程序+]教程的一部分。
 
 
-
+[[_application_source_code_from_the_previous_lesson]]
 == 来自上一课的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/files/documents/4/1931/lesson5.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
 
 Oracle 数据库用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson5.zip[+此处+]以下载源代码,该代码反映了在完成上一课之后的项目状态。
 
-
+[[_submitting_a_new_wish]]
 == 提交新的愿望
 
 用户可使用以下步骤提交新的愿望:
 
-1. 用户进行登录,切换到  ``editWishList.php``  页,然后按 "Add Wish" 按钮。 ``editWish.php``  页打开,并显示 HTML 窗体。
+1. 用户进行登录,切换到  `editWishList.php`  页,然后按 "Add Wish" 按钮。 `editWish.php`  页打开,并显示 HTML 窗体。
 2. 用户在 HTML 窗体中输入愿望说明,可能还会输入他/她希望实现愿望的日期,然后按 "Save Changes" 按钮。
 3. 如果提交窗体而未输入愿望说明,用户将返回到窗体进行重试。如果用户提交了截止日期而没有提供说明,在重新加载窗体时,将重新显示该日期。
 
 要为用户实现此过程,请在应用程序中添加以下功能:
 
-* <<add-wish-ui-elements,用户界面组件>>,包含添加愿望的 HTML 窗体以及  ``editWishList.php `` 中将用户重定向到该窗体的按钮。
-* 在提交不完整的窗体时<<inputFormAfterunsuccessfulSave,重新显示截止日期>>的代码。
+* <<add-wish-ui-elements,用户界面组件>>,包含添加愿望的 HTML 窗体以及  `editWishList.php ` 中将用户重定向到该窗体的按钮。
+* 在提交不完整的窗体时<<_returning_to_the_front_index_php_page,重新显示截止日期>>的代码。
 
 
 [[add-wish-ui-elements]]
@@ -101,7 +80,7 @@
 
 *添加功能以添加新的愿望:*
 
-1. 实现 "Add Wish" 按钮。在  ``editWishList.php``  文件的 PHP 块下面添加以下 HTML 代码:
+1. 实现 "Add Wish" 按钮。在  `editWishList.php`  文件的 PHP 块下面添加以下 HTML 代码:
 
 [source,xml]
 ----
@@ -109,8 +88,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
     <head>
-
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
         <form name="addNewWish" action="editWish.php">            
@@ -122,9 +100,9 @@
 
 *注:*您可以忽略来自 HTML 验证器的警告。
 
-窗体包含  ``submit``  类型的 "Add Wish" 输入字段。该字段实现 "Add Wish" 按钮。当用户单击 "Add Wish" 时,他们将重定向到  ``editWish.php``  页。由于没有通过该窗体传输任何数据,因此,不会使用服务器请求方法。
+窗体包含  `submit`  类型的 "Add Wish" 输入字段。该字段实现 "Add Wish" 按钮。当用户单击 "Add Wish" 时,他们将重定向到  `editWish.php`  页。由于没有通过该窗体传输任何数据,因此,不会使用服务器请求方法。
 
-2. 在 addNewWish 窗体上面添加一个表以显示许愿者的现有愿望。代码类似于  ``wishlist.php`` 。
+2. 在 addNewWish 窗体上面添加一个表以显示许愿者的现有愿望。代码类似于  `wishlist.php` 。
 
 *对于 MySQL 数据库*:
 
@@ -132,7 +110,20 @@
 [source,php]
 ----
 
-<table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row['description']) . "</td>";echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";}?></table>
+<table border="black">
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
+    <?php
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+        echo "<td>" . htmlentities($row['due_date']) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+</table>
 ----
 
 *对于 Oracle 数据库:*
@@ -142,18 +133,22 @@
 ----
 
 <table border="black">
-    <tr><th>Item</th><th>Due Date</th></tr>
+    <tr>
+        <th>Item</th>
+        <th>Due Date</th>
+    </tr>
     <?php
-    require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $stid = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
-    while ($row = oci_fetch_array($stid)) {echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
+    while ($row = oci_fetch_array($stid)) {
+        echo "<tr><td>" . htmlentities($row['DESCRIPTION']) . "</td>";
+        echo "<td>" . htmlentities($row['DUE_DATE']) . "</td></tr>\n";
     }
+    oci_free_statement($stid);
     ?>
 </table>
 ----
-3. 在 "Source Files"(源文件)文件夹中创建  ``editWish.php``  PHP 文件。
-4. 在  ``editWish.php``  中,实现 "Add Wish" 窗体。在 <? php ?> 块下键入或粘贴以下代码:
+3. 在 "Source Files"(源文件)文件夹中创建  `editWish.php`  PHP 文件。
+4. 在  `editWish.php`  中,实现 "Add Wish" 窗体。在 <? php ?> 块下键入或粘贴以下代码:
 
 [source,xml]
 ----
@@ -163,10 +158,14 @@
 <html>
     <head>
 
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     </head>
     <body>
-        <form name="editWish" action="editWish.php" method="POST">Describe your wish: <input type="text" name="wish"  value="" /><br/>When do you want to get it? <input type="text" name="dueDate" value=""/><br/><input type="submit" name="saveWish" value="Save Changes"/><input type="submit" name="back" value="Back to the List"/>
+        <form name="editWish" action="editWish.php" method="POST">
+            Describe your wish: <input type="text" name="wish"  value="" /><br/>
+            When do you want to get it? <input type="text" name="dueDate" value=""/><br/>
+            <input type="submit" name="saveWish" value="Save Changes"/>
+            <input type="submit" name="back" value="Back to the List"/>
         </form>
     </body>
 </html> 
@@ -176,39 +175,44 @@
 
 * 两个空文本字段,用于输入愿望说明和截止日期。
 * 在输入字段旁边输出的文本。
-* 表示 "Save Changes" 按钮的  ``submit``  字段
-* 表示 "Back to the List" 按钮的  ``submit``  字段,用于返回到  ``editWishList.php``  页
+* 表示 "Save Changes" 按钮的  `submit`  字段
+* 表示 "Back to the List" 按钮的  `submit`  字段,用于返回到  `editWishList.php`  页
 
-在按 "Add Wish" 按钮后,窗体将通过请求方法 POST 将输入的数据提交到同一页面,即  ``editWish.php`` 。
+在按 "Add Wish" 按钮后,窗体将通过请求方法 POST 将输入的数据提交到同一页面,即  `editWish.php` 。
 
-
+[[_redisplaying_the_due_date_after_an_unsuccessful_submission]]
 === 在提交失败后重新显示截止日期
 
-如果用户在 "Add Wish" 窗体中未填写说明,则会显示一条错误消息,并且用户会返回到  ``editWish.php``  页。当用户返回到  ``editWish.php``  时,"Add Wish" 窗体应显示  ``dueDate``  值(如果已输入)。在当前的窗体实现中,这两个字段始终为空。要保留输入的值,您需要将新愿望数据保存到数组中。该数组包含两个名为  ``description``  和  ``due_date``  的元素。然后,您需要更改 "Add Wish" 窗体,使其能够从数组中检索  ``dueDate``  字段值。
+如果用户在 "Add Wish" 窗体中未填写说明,则会显示一条错误消息,并且用户会返回到  `editWish.php`  页。当用户返回到  `editWish.php`  时,"Add Wish" 窗体应显示  `dueDate`  值(如果已输入)。在当前的窗体实现中,这两个字段始终为空。要保留输入的值,您需要将新愿望数据保存到数组中。该数组包含两个名为  `description`  和  `due_date`  的元素。然后,您需要更改 "Add Wish" 窗体,使其能够从数组中检索  `dueDate`  字段值。
 
-*注:*未输入说明时,重新加载输入窗体的代码包含在<<validateAndEnterWishToDatabase,用于验证数据并将其输入到数据库的代码>>中。本部分未介绍该代码。本部分中的代码仅保留  ``dueDate``  值,以便在重新加载窗体时显示该值。
+*注:*未输入说明时,重新加载输入窗体的代码包含在<<_verifying_the_wisher_s_logon,用于验证数据并将其输入到数据库的代码>>中。本部分未介绍该代码。本部分中的代码仅保留  `dueDate`  值,以便在重新加载窗体时显示该值。
 
 *在用户提交输入窗体失败后重新显示该窗体:*
 
-1. 在  ``editWish.php``  的 HTML <body> 元素内,紧靠输入窗体上面键入或粘贴以下代码块:
+1. 在  `editWish.php`  的 HTML <body> 元素内,紧靠输入窗体上面键入或粘贴以下代码块:
 
 [source,php]
 ----
 
-<?php 
-if ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("description" => $_POST["wish"], "due_date" => $_POST["dueDate"]);else$wish = array("description" => "", "due_date" => "");
-?>  
+<?php
+if ($_SERVER['REQUEST_METHOD'] == "POST")
+    $wish = array("description" => $_POST['wish'],
+                        "due_date" => $_POST['dueDate']);
+else
+    $wish = array("description" => "",
+                        "due_date" => "");
+?>
 ----
 
-该代码检查使用哪个请求服务器方法传输数据,并创建一个名为 $wish 的数组。如果该方法是 POST(表示在尝试保存具有空说明的愿望失败后显示输入窗体),则  ``description``  和  ``due_date``  元素接受通过 POST 传输的值。
+该代码检查使用哪个请求服务器方法传输数据,并创建一个名为 $wish 的数组。如果该方法是 POST(表示在尝试保存具有空说明的愿望失败后显示输入窗体),则  `description`  和  `due_date`  元素接受通过 POST 传输的值。
 
-如果该方法不是 POST(表示在重定向窗体后第一次显示输入窗体),则  ``editWishList.php``  页以及  ``description``  和  ``due_date``  元素均为空。
+如果该方法不是 POST(表示在重定向窗体后第一次显示输入窗体),则  `editWishList.php`  页以及  `description`  和  `due_date`  元素均为空。
 
-*注:*在这两种情况下,说明均为空。唯一的区别是  ``dueDate`` 。
+*注:*在这两种情况下,说明均为空。唯一的区别是  `dueDate` 。
 
-2. 更新 "Add Wish" 窗体,以便从  ``$wish``  数组中检索其输入字段的值。将 "Add Wish" 窗体中的行:
+2. 更新 "Add Wish" 窗体,以便从  `$wish`  数组中检索其输入字段的值。将 "Add Wish" 窗体中的行:
 
-[source,java]
+[source,php]
 ----
 
 Describe your wish: <input type="text" name="wish"  value="" /><br/>
@@ -223,13 +227,13 @@
 When do you want to get it? <input type="text" name="dueDate" value="<?php echo $wish['due_date']; ?>"/><br/>
 ----
 
-
+[[_verifying_the_wisher_s_logon]]
 == 验证许愿者的登录
 
-在  ``editWish.php``  文件中,在文件顶部的 <? php ?> 块中输入以下会话处理代码:
+在  `editWish.php`  文件中,在文件顶部的 <? php ?> 块中输入以下会话处理代码:
 
 
-[source,java]
+[source,php]
 ----
 
 session_start();
@@ -253,10 +257,10 @@
 
 在用户提交新的愿望后,应用程序需要将愿望添加到“愿望”数据库中。要实现该功能,请在应用程序中添加以下代码:
 
-* 向  ``db.php``  的  ``WishDB``  类中添加另外两个辅助函数。
+* 向  `db.php`  的  `WishDB`  类中添加另外两个辅助函数。
 * 一个函数将新记录添加到 wishes 表中。
 * 另一个函数将日期转换为 MySQL 数据库服务器支持的格式。
-* 在  ``editWish.php``  中添加代码,以使用  ``WishDB``  中的新辅助函数在数据库中输入新的愿望。
+* 在  `editWish.php`  中添加代码,以使用  `WishDB`  中的新辅助函数在数据库中输入新的愿望。
 
 
 [[add-insert-wish]]
@@ -264,33 +268,40 @@
 
 该函数要求将许愿者 ID、新愿望说明和愿望截止日期作为输入参数,并在数据库的新记录中输入该数据。该函数不会返回任何值。
 
-打开  ``db.php ``  并将  ``insert_wish``  函数添加到  ``WishDB``  类中:
+打开  `db.php `  并将  `insert_wish`  函数添加到  `WishDB`  类中:
 
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-function insert_wish($wisherID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($this->format_date_for_sql($duedate)==null){$this->query("INSERT INTO wishes (wisher_id, description)" ." VALUES (" . $wisherID . ", '" . $description . "')");} else$this->query("INSERT INTO wishes (wisher_id, description, due_date)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ")");
+function insert_wish($wisherID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($this->format_date_for_sql($duedate)==null){
+       $this->query("INSERT INTO wishes (wisher_id, description)" .
+            " VALUES (" . $wisherID . ", '" . $description . "')");
+    } else
+        $this->query("INSERT INTO wishes (wisher_id, description, due_date)" .
+            " VALUES (" . $wisherID . ", '" . $description . "', "
+            . $this->format_date_for_sql($duedate) . ")");
 }
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 function insert_wish($wisherID, $description, $duedate) {
-  $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))"; 
-  $stid = oci_parse($this->con, $query);
-  oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
-  oci_bind_by_name($stid, ':desc_bv', $description);
-  oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
-  oci_execute($stid);
-  oci_free_statement($stid);
+    $query = "INSERT INTO wishes (wisher_id, description, due_date) VALUES (:wisher_id_bv, :desc_bv, to_date(:due_date_bv, 'YYYY-MM-DD'))";
+    $stid = oci_parse($this->con, $query);
+    oci_bind_by_name($stid, ':wisher_id_bv', $wisherID);
+    oci_bind_by_name($stid, ':desc_bv', $description);
+    oci_bind_by_name($stid, ':due_date_bv', $this->format_date_for_sql($duedate));
+    oci_execute($stid);
+    oci_free_statement($stid);
 }
 ----
 
@@ -300,90 +311,95 @@
 [[add-format-date-for-sql]]
 === 将 format_date_for_sql 函数添加到 WishDB 中
 
-将  ``format_date_for_sql``  函数添加到  ``db.php``  的  ``WishDB``  类中。该函数需要一个字符串,并将日期作为输入参数。该函数返回具有数据库服务器可处理的格式的日期;如果输入字符串为空,则返回 ``空值`` 。
+将  `format_date_for_sql`  函数添加到  `db.php`  的  `WishDB`  类中。该函数需要一个字符串,并将日期作为输入参数。该函数返回具有数据库服务器可处理的格式的日期;如果输入字符串为空,则返回 `空值` 。
 
-*注:*本示例中的函数使用 PHP  ``date_parse``  函数。该函数仅适用于英语语言的日期(如 December 25, 2010)和阿拉伯数字。专业 Web 站点使用日期选取器。
+*注:*本示例中的函数使用 PHP  `date_parse`  函数。该函数仅适用于英语语言的日期(如 December 25, 2010)和阿拉伯数字。专业 Web 站点使用日期选取器。
 
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-function format_date_for_sql($date){if ($date == "")return null;else {$dateParts = date_parse($date);return $dateParts["year"]*10000 + $dateParts["month"]*100 + $dateParts["day"];}}
-----
-
-*对于 Oracle 数据库:*
-
-
-[source,java]
-----
-
-function format_date_for_sql($date){
+function format_date_for_sql($date) {
     if ($date == "")
         return null;
     else {
         $dateParts = date_parse($date);
-        return $dateParts['year']*10000 + '-' + $dateParts['month']*100 + '-' + $dateParts['day'];
-   }
+        return $dateParts["year"] * 10000 + $dateParts["month"] * 100 + $dateParts["day"];
+    }
+}
+
+*对于 Oracle 数据库:*
+
+
+[source,php]
+----
+
+function format_date_for_sql($date) {
+    if ($date == "")
+        return null;
+    else {
+        $dateParts = date_parse($date);
+        return $dateParts['year'] * 10000 + '-' + $dateParts['month'] * 100 + '-' + $dateParts['day'];
+    }
 }
 ----
 
-如果输入字符串为空,则代码返回空值。否则,将  ``$date``  作为输入参数以调用内部  ``date_parse``  函数。 ``date_parse``  函数返回一个数组,其中包含三个名为  ``$dateParts["year"]`` 、 ``$dateParts["month"]``  和  ``$dateParts["day"]``  的元素。最终输出字符串由  ``$dateParts``  数组元素组成。
+如果输入字符串为空,则代码返回空值。否则,将  `$date`  作为输入参数以调用内部  `date_parse`  函数。 `date_parse`  函数返回一个数组,其中包含三个名为  `$dateParts["year"]` 、 `$dateParts["month"]`  和  `$dateParts["day"]`  的元素。最终输出字符串由  `$dateParts`  数组元素组成。
 
-*重要说明:* ``date_parse``  函数仅识别英语日期。例如,它解析 "February 2, 2016" 而不解析 "2 Unora, 2016"。
+*重要说明:* `date_parse`  函数仅识别英语日期。例如,它解析 "February 2, 2016" 而不解析 "2 Unora, 2016"。
 
-*Oracle 数据库用户注意事项:*唯一的格式要求是, ``return $dateParts...``  语句中的日期格式应与  ``insert_wish``  查询的  ``to_date``  SQL 函数中的日期格式相匹配。
+*Oracle 数据库用户注意事项:*唯一的格式要求是, `return $dateParts...`  语句中的日期格式应与  `insert_wish`  查询的  `to_date`  SQL 函数中的日期格式相匹配。
 
 
 [[validateAndEnterWishToDatabase]]
 === 在数据库中输入新的愿望记录
 
-现在,您已开发了辅助函数,接下来便可添加代码以验证新的愿望数据;如果数据有效,则将数据输入到数据库中。如果数据无效,代码必须重新加载 "Add Wish" 窗体。如果数据无效的原因是没有输入说明,但输入了截止日期,则会保存截止日期并在重新加载窗体时重新显示该日期,您<<inputFormAfterunsuccessfulSave,以前开发的>>代码实现了该功能。
+现在,您已开发了辅助函数,接下来便可添加代码以验证新的愿望数据;如果数据有效,则将数据输入到数据库中。如果数据无效,代码必须重新加载 "Add Wish" 窗体。如果数据无效的原因是没有输入说明,但输入了截止日期,则会保存截止日期并在重新加载窗体时重新显示该日期,您<<_returning_to_the_front_index_php_page,以前开发的>>代码实现了该功能。
 
-在顶部 <? php?> 块(属于  ``editWish.php`` )中会话处理代码下面输入以下代码:
+在顶部 <? php?> 块(属于  `editWish.php` )中会话处理代码下面输入以下代码:
 
 
-[source,java]
+[source,php]
 ----
 
 require_once("Includes/db.php");
-    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
+$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION['user']);
 
-    $wishDescriptionIsEmpty = false;
-    if ($_SERVER['REQUEST_METHOD'] == "POST"){
-        if (array_key_exists("back", $_POST)) {
-           header('Location: editWishList.php' ); 
-           exit;
-        } else
-        if ($_POST['wish'] == "") {
-            $wishDescriptionIsEmpty =  true;
-        } 
-		 else {
-           WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
-           header('Location: editWishList.php' );
-           exit;
-        }
+$wishDescriptionIsEmpty = false;
+if ($_SERVER['REQUEST_METHOD'] == "POST"){
+    if (array_key_exists("back", $_POST)) {
+        header('Location: editWishList.php' ); 
+        exit;
+    } else
+    if ($_POST['wish'] == "") {
+        $wishDescriptionIsEmpty =  true;
+    } else {
+        WishDB::getInstance()->insert_wish($wisherID, $_POST['wish'], $_POST['dueDate']);
+        header('Location: editWishList.php' );
+        exit;
     }
-	
+}
+  
 ----
 
 该代码执行以下功能:
 
-* 允许使用  ``db.php``  文件
-* 获取或创建  ``WishDB``  类实例
-* 通过调用  ``get_wisher_id_by_name``  函数,检索尝试添加愿望的许愿者的 ID
-* 初始化  ``$wishDescriptionIsEmpty``  标志,该标志将在以后显示错误消息时使用。
-* 检查请求方法是否为 POST,这意味着数据是从窗体中提交的,目的是在  ``editWish.php``  页中输入愿望数据。
-* 检查  ``$_POST``  数组是否包含具有 "back" 键的元素
+* 允许使用  `db.php`  文件
+* 获取或创建  `WishDB`  类实例
+* 通过调用  `get_wisher_id_by_name`  函数,检索尝试添加愿望的许愿者的 ID
+* 初始化  `$wishDescriptionIsEmpty`  标志,该标志将在以后显示错误消息时使用。
+* 检查请求方法是否为 POST,这意味着数据是从窗体中提交的,目的是在  `editWish.php`  页中输入愿望数据。
+* 检查  `$_POST`  数组是否包含具有 "back" 键的元素
 
-如果  ``$_POST``  数组包含具有 "back" 键的元素,则在提交窗体之前按了 "Back to the List" 按钮。在这种情况下,代码会将用户重定向到  ``editWishList.php`` ,而不保存在字段中输入的任何数据并停止 PHP 处理。
+如果  `$_POST`  数组包含具有 "back" 键的元素,则在提交窗体之前按了 "Back to the List" 按钮。在这种情况下,代码会将用户重定向到  `editWishList.php` ,而不保存在字段中输入的任何数据并停止 PHP 处理。
 
 如果 $_POST 数组_不_包含具有 "back" 键的元素,则数据是通过按 "Save Changes" 按钮提交的。在这种情况下,代码验证是否填写了愿望说明。该代码的工作方式是,检查 $_POST 数组中具有 "wish" 键的元素是否为空;如果该键为空,则将 $wishDescriptionIsEmpty 标志更改为 true。请注意,不会在 PHP 块中执行其他代码,将重新加载 "Add Wish" 窗体。
 
-如果未按 "Back to the List" 按钮但填写了愿望说明,代码将调用  ``insert_wish``  函数并将许愿者 ID、说明和愿望截止日期作为输入参数。然后,代码将用户重定向到  ``editWishList.php``  页并停止 PHP 处理。
+如果未按 "Back to the List" 按钮但填写了愿望说明,代码将调用  `insert_wish`  函数并将许愿者 ID、说明和愿望截止日期作为输入参数。然后,代码将用户重定向到  `editWishList.php`  页并停止 PHP 处理。
 
-
+[[_displaying_error_messages]]
 === 显示错误消息
 
 如果用户尝试保存愿望,但没有输入愿望说明,则一定会显示错误消息。
@@ -393,16 +409,19 @@
 [source,php]
 ----
 
-<?phpif ($wishDescriptionIsEmpty) echo "Please enter description<br/>";?>
+<?php
+if ($wishDescriptionIsEmpty)
+    echo "Please enter description<br/>";
+?>
 ----
 
-如果  ``$wishDescriptionIsEmpty``  标志为 true,则会显示错误消息。该标志是在输入窗体验证期间处理的。
+如果  `$wishDescriptionIsEmpty`  标志为 true,则会显示错误消息。该标志是在输入窗体验证期间处理的。
 
-
+[[_returning_to_the_front_index_php_page]]
 == 返回到主页 index.php
 
 用户应该能够随时按某个按钮返回到应用程序主页。
-要实现该功能,请在  ``editWishList.php``  文件中的结束 </body> 标记前面输入以下 HTML 输入窗体:
+要实现该功能,请在  `editWishList.php`  文件中的结束 </body> 标记前面输入以下 HTML 输入窗体:
 
 
 [source,xml]
@@ -413,30 +432,33 @@
 
 一按下 "Back to Main Page" 按钮,该窗体便将用户重定向到主页 index.php。
 
-
+[[_testing_the_add_wish_functionality]]
 == 测试添加愿望功能
 
-1. 运行应用程序。在  ``index.php``  页上,填写以下字段:在 "Username" 字段中输入 "Tom",在 "Password" 字段中输入 "tomcat"。
+1. 运行应用程序。在  `index.php`  页上,填写以下字段:在 "Username" 字段中输入 "Tom",在 "Password" 字段中输入 "tomcat"。
 image::images/user-logon-to-edit-wish-list.png[]
-2. 按 "Edit My Wish List" 按钮。 ``editWishList.php``  页打开。 
+2. 按 "Edit My Wish List" 按钮。 `editWishList.php`  页打开。 
+
 image::images/edit-wish-list-add-wish.png[]
-3. 按 "Back to Main Page" 按钮。 ``index.php``  页打开。
-4. 以 Tom 身份登录,然后再次按 "Edit My Wish List" 按钮。 ``editWishList.php``  页打开。
-5. 按 "Add Wish" 按钮。 ``editWish.php``  页打开。填写窗体。
+
+3. 按 "Back to Main Page" 按钮。 `index.php`  页打开。
+4. 以 Tom 身份登录,然后再次按 "Edit My Wish List" 按钮。 `editWishList.php`  页打开。
+5. 按 "Add Wish" 按钮。 `editWish.php`  页打开。填写窗体。
 image::images/new-wish.png[] 
-按 "Back to the List" 按钮。 ``editWishList.php``  页打开,但未添加输入的愿望。
-6. 再次按 "Add Wish" 按钮。 ``editWish.php``  页打开。填写截止日期并将说明保留空白。按 "Save Changes" 按钮。 ``editWish.php``  页将显示输入窗体,其中包含一条错误消息和填写的截止日期。
-7. 再次按 "Add Wish" 按钮。 ``editWish.php``  页打开。填写窗体,然后按 "Save Changes" 按钮。 ``editWishList.php``  页将显示更新的愿望列表。 
+按 "Back to the List" 按钮。 `editWishList.php`  页打开,但未添加输入的愿望。
+6. 再次按 "Add Wish" 按钮。 `editWish.php`  页打开。填写截止日期并将说明保留空白。按 "Save Changes" 按钮。 `editWish.php`  页将显示输入窗体,其中包含一条错误消息和填写的截止日期。
+7. 再次按 "Add Wish" 按钮。 `editWish.php`  页打开。填写窗体,然后按 "Save Changes" 按钮。 `editWishList.php`  页将显示更新的愿望列表。 
+
 image::images/edit-wish-list-updated.png[]
 
-
+[[_application_source_code_after_the_current_lesson_is_completed]]
 == 完成当前课程后的应用程序源代码
 
 MySQL 用户:单击link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+此处+]以下载源代码,该代码反映了在完成课程后的项目状态。
 
 Oracle 数据库用户:单击link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+此处+]以下载源代码,该代码反映了在完成课程后的项目状态。
 
-
+[[_next_steps]]
 == 后续步骤
 
 link:wish-list-lesson5.html[+<< 上一课+]
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7.asciidoc
index 7020637..05b3174 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7.asciidoc
@@ -40,142 +40,133 @@
 :description: Lesson 7: Updating and Deleting Entries in the Database - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lesson 7: Updating and Deleting Entries in the Database
 
-
-Tutorial contents:
-
-1. link:wish-list-tutorial-main-page.html[+Creating a Database Driven Application With PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. link:wish-list-oracle-lesson1.html[+Creating Oracle Database Tables+]
-3. 
-link:wish-list-lesson2.html[+Designing the Application. Reading from the Database+]
-
-4. link:wish-list-lesson3.html[+Creating a New Application User +]
-5. link:wish-list-lesson4.html[+Optimizing the Code+]
-6. link:wish-list-lesson5.html[+Adding Security. Implementing Application User Logon+]
-7. link:wish-list-lesson6.html[+ Adding a New Wish to the Database+]
-8. 
-*=> Updating and Deleting Entries in the Database*
-
-* <<previousLessonSourceCode,Application Source Code from the Previous Lesson>>
-* <<editWish,Editing a Wish>>
-* <<addEditButton,Implementing the Edit Button>>
-* <<wishArrayUpdate,Expanding the $wish Array >>
-* <<updateInputForm,Updating the HTML Input Form>>
-* <<updateWishRecord,Updating the Wish in the Database>>
-* <<testingEditWishFunctionality,Testing the Edit Wish Functionality>>
-* <<deleteWish,Deleting a Wish>>
-* <<testingDeleteWishFunctionality,Testing the Delete Wish Functionality>>
-* <<lessonResultSourceCode,Application Source Code After the Current Lesson Is Completed>>
-* <<nextSteps,Next Steps>>
-9. link:wish-list-lesson8.html[+Making the Application Look Better Using the CSS Technology+]
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
 In this lesson you will expand the application's functionality with two features:
 
-* <<editWish,Editing a wish>>
-* <<deleteWish,Deleting a wish>>
+* <<_editing_a_wish,Editing a wish>>
+* <<_deleting_a_wish,Deleting a wish>>
 
-To implement these features, you edit the  ``editWishList.php``  and  ``editWish.php``  files. You also create a new file named  ``deleteWish.php`` .
+To implement these features, you edit the  `editWishList.php`  and  `editWish.php`  files. You also create a new file named  `deleteWish.php` .
 
 image::images/page-flow-diagram-l7.png[]
 
 The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
 
 
-
 == Application Source Code from the Previous Lesson
 
 MySQL users: Click link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+ here+] to download the source code that reflects the project state after the previous lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson6.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
 
 == Editing a Wish
 
 The functionality supports the following use case:
 
-* On the  ``editWishList.php``  page, the user presses the Edit button to the right of a wish. The  ``editWish.php``  page with the data of the selected wish opens.
+* On the  `editWishList.php`  page, the user presses the Edit button to the right of a wish. The  `editWish.php`  page with the data of the selected wish opens.
 * The user changes the description and/or the due date of the wish and presses the Save Changes button.
-* If the description is _not_ filled in, an error message is displayed and the user returns to the  ``editWish.php``  page.
-* If the description is filled in, the application returns to the  ``editWishList.php``  page, where the wish is updated.
+* If the description is _not_ filled in, an error message is displayed and the user returns to the  `editWish.php`  page.
+* If the description is filled in, the application returns to the  `editWishList.php`  page, where the wish is updated.
 
 The implementation consists of the following steps:
 
-* <<addEditButton,Adding an Edit button on the editWishList page>>
-* <<wishArrayUpdate,On the editWish.php page, updating the array $wish for storing wish data>>
-* <<updateInputForm,Updating the input form on the editWish.php page>>
-* <<updateWishRecord,Validation of the submitted data and updating the wish in the database>>
+* <<_implementing_the_edit_button,Adding an Edit button on the editWishList page>>
+* <<_expanding_the_code_wish_code_array,On the editWish.php page, updating the array $wish for storing wish data>>
+* <<_updating_the_html_input_form,Updating the input form on the editWish.php page>>
+* <<_updating_the_wish_in_the_database,Validation of the submitted data and updating the wish in the database>>
 
 
 === Implementing the Edit Button
 
-In  ``editWishList.php`` , a table with the wishes of a wisher is implemented by a loop (a  ``while `` statement) that displays rows with wishes while the wishes are selected from the database. Add an Edit button as the extreme right cell in a row.
+In  `editWishList.php` , a table with the wishes of a wisher is implemented by a loop (a  `while ` statement) that displays rows with wishes while the wishes are selected from the database. Add an Edit button as the extreme right cell in a row.
 
-1. To transfer the ID of a wish through the HTML input form, store it in a variable. Enter the following code line at the end of the  ``while `` loop:
+1. To transfer the ID of a wish through the HTML input form, store it in a variable. Enter the following code line at the end of the  `while ` loop:
 
-[source,java]
+[source,php]
 ----
-
-while ($row = ...) {echo ...echo ...*$wishID = $row["id"];*}
-?>
+while ($row = mysqli_fetch_array($result)):
+    echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+    echo "<td>" . htmlentities($row['due_date']) . "</td>";
+    $wishID = $row['id'];
+    echo "<td>WishID=" . $wishID . "</td>";
+    //The loop is left open
+    ?>
 ----
-2. Implement the edit button. Add another table cell before the closing </table> tag, with the editWish form. This form contains a button component and a hidden component that sends the value of  ``$wishID``  when the button is clicked. (Code for the MySQL database is shown, but the added code is the same and in the same location for Oracle Database.)
+2. Implement the edit button. Add another table cell before the closing </table> tag, with the editWish form. This form contains a button component and a hidden component that sends the value of  `$wishID`  when the button is clicked. (Code for the MySQL database is shown, but the added code is the same and in the same location for Oracle Database.)
 
 [source,php]
 ----
 
-   Hello <?php echo $_SESSION["user"]; ?><br/><table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while ($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";}mysqli_free_result($result);?>
-            *<td>
-                <form name="editWish" action="editWish.php" method="GET">
-                    <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-                    <input type="submit" name="editWish" value="Edit">
-                    </form>
-            </td>*</table>
-----
-3. Change the  ``while``  loop to use link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+alternative syntax+]. This makes it easy to execute HTML blocks inside the  ``while``  loop. In the alternative  ``while``  loop syntax, the opening curly bracket { is replaced by a colon :, and the ending curly bracket } is replaced by the statement  ``endwhile;`` . Replace the opening curly bracket with a colon, delete the closing curly bracket, and add a new PHP block before the closing </table> tag with the  ``endwhile;``  statement. This encorporates the new table cell into the  ``while``  loop. Move the free result/free statement code to after the  ``endwhile;``  statement. (Again, the code for MySQL is shown, but the code change and location is the same for Oracle Database.)
-
-[source,php]
-----
-
-    while ($row = mysqli_fetch_array($result))[.line-through]#{#*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";[.line-through]#    }mysqli_free_result($result);#?>
+Hello <?php echo $_SESSION["user"]; ?><br/>
+<table border="black">
+    <tr><th>Item</th><th>Due Date</th></tr>
+    <?php
+    require_once("Includes/db.php");
+    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-           <input type="submit" name="editWish" value="Edit">
+            <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-*    <?php
-    endwhile;
-    mysqli_free_result($result);
-    ?>*
 </table>
 ----
-4. 
-Fix the table row syntax. Move the row-closing </tr>\n characters from the due date echo statement to a new echo statement just above the  ``endwhile;`` .
-
+3. Change the  `while`  loop to use link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+alternative syntax+]. This makes it easy to execute HTML blocks inside the  `while`  loop. In the alternative  `while`  loop syntax, the opening curly bracket { is replaced by a colon :, and the ending curly bracket } is replaced by the statement  `endwhile;` . Replace the opening curly bracket with a colon, delete the closing curly bracket, and add a new PHP block before the closing </table> tag with the  `endwhile;`  statement. This encorporates the new table cell into the  `while`  loop. Move the free result/free statement code to after the  `endwhile;`  statement. (Again, the code for MySQL is shown, but the code change and location is the same for Oracle Database.)
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+   while ($row = mysqli_fetch_array($result)){:
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
     <?php
-    *echo "</tr>\n";*
+    endwhile;
+    mysqli_free_result($result);
+    ?>
+</table>
+----
+4. 
+Fix the table row syntax. Move the row-closing </tr>\n characters from the due date echo statement to a new echo statement just above the  `endwhile;` .
+
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
+    <td>
+        <form name="editWish" action="editWish.php" method="GET">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+           <input type="submit" name="editWish" value="Edit">
+        </form>
+    </td>
+    <?php
+    echo "</tr>\n";
     endwhile;
     mysqli_free_result($result);
     ?>
 </table>
 ----
 5. 
-The entire table, including the form with the Edit button inside the  ``while `` loop, now looks like this:
+The entire table, including the form with the Edit button inside the  `while ` loop, now looks like this:
 
 *For the MySQL database:*
 
@@ -245,14 +236,13 @@
 </table>
 ----
 
+=== Expanding the  `$wish`  Array
 
-=== Expanding the  ``$wish``  Array
+Upon pressing the Edit button on the  `editWishList.php`  page, the ID of the selected wish is transferred to the  `editWish.php`  page through the Server Request method GET. To store the id of the wish, you need to add a new element to the  `$wish`  array.
 
-Upon pressing the Edit button on the  ``editWishList.php``  page, the ID of the selected wish is transferred to the  ``editWish.php``  page through the Server Request method GET. To store the id of the wish, you need to add a new element to the  ``$wish``  array.
+As when adding a new wish, the input form can be accessed both from the  `editWishList.php`  page and from the  `editWish.php`  page after an unsuccessful attempt to save. The cases are distinguished by the Server Request method through which the data is transferred. GET indicates that the form is displayed when the user first gets to the page by pressing Edit Wish. POST indicates that the user is redirected to the form after attempting to save a wish without a description.
 
-As when adding a new wish, the input form can be accessed both from the  ``editWishList.php``  page and from the  ``editWish.php``  page after an unsuccessful attempt to save. The cases are distinguished by the Server Request method through which the data is transferred. GET indicates that the form is displayed when the user first gets to the page by pressing Edit Wish. POST indicates that the user is redirected to the form after attempting to save a wish without a description.
-
-In  ``editWish.php`` , replace the PHP block in the HTML <body> above the  ``EditWish``  input form with expanded code for the  ``$wish``  array.
+In  `editWish.php` , replace the PHP block in the HTML <body> above the  `EditWish`  input form with expanded code for the  `$wish`  array.
 
 *For the MySQL database:*
 
@@ -260,8 +250,15 @@
 [source,php]
 ----
 
-<?phpif ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("id" => $_POST["wishID"], "description" => 
-        $_POST["wish"], "due_date" => $_POST["dueDate"]);else if (array_key_exists("wishID", $_GET))$wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));else$wish = array("id" => "", "description" => "", "due_date" => "");?>
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "POST")
+    $wish = array("id" => $_POST["wishID"], "description" => 
+            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+else if (array_key_exists("wishID", $_GET))
+    $wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));
+else
+    $wish = array("id" => "", "description" => "", "due_date" => "");
+?>
 ----
 
 *For the Oracle database:*
@@ -273,7 +270,7 @@
 <?php
 if ($_SERVER["REQUEST_METHOD"] == "POST")
     $wish = array("id" => $_POST["wishID"], "description" =>
-            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+                $_POST["wish"], "due_date" => $_POST["dueDate"]);
 else if (array_key_exists("wishID", $_GET)) {
     $stid = WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]);
     $row = oci_fetch_array($stid, OCI_ASSOC);
@@ -281,23 +278,23 @@
                 $row["DESCRIPTION"], "due_date" => $row["DUE_DATE"]);
     oci_free_statement($stid);
 } else
-$wish = array("id" => "", "description" => "", "due_date" => "");
+    $wish = array("id" => "", "description" => "", "due_date" => "");
 ?>
 ----
 
-The code initializes the  ``$wish``  array with three elements:  ``id`` ,  ``description`` , and  ``due_date`` . The values of these elements depend on the Server Request method. If the Server Request method is POST, the values are received from the input form. Otherwise, if the Server Request method is GET and the $_GET array contains an element with the key "wishID", the values are retrieved from the database by the function get_wish_by_wish_id. Finally, if the Server Request method is neither POST nor GET, which means the Add New Wish use case takes place, the elements are empty.
+The code initializes the  `$wish`  array with three elements:  `id` ,  `description` , and  `due_date` . The values of these elements depend on the Server Request method. If the Server Request method is POST, the values are received from the input form. Otherwise, if the Server Request method is GET and the $_GET array contains an element with the key "wishID", the values are retrieved from the database by the function get_wish_by_wish_id. Finally, if the Server Request method is neither POST nor GET, which means the Add New Wish use case takes place, the elements are empty.
 
 The preceding code covers the cases for creation and editing wishes. Now you need to update the input form so that it can be also used for both cases.
 
 
 === Updating the HTML Input Form
 
-Currently the input form works when you want to create a new wish and there is no wish id. For the form to work when you want to edit an existing wish, you need to add a hidden field for transferring the ID of a wish. The value of the hidden field must be retrieved from the $wish array. The value must be an empty string during the creation of a new wish. If the wish is edited, the value of the hidden field must change to the ID of the wish. To create this hidden field, add the following line to the top of the  ``EditWish``  input form in  ``editWish.php`` :
+Currently the input form works when you want to create a new wish and there is no wish id. For the form to work when you want to edit an existing wish, you need to add a hidden field for transferring the ID of a wish. The value of the hidden field must be retrieved from the $wish array. The value must be an empty string during the creation of a new wish. If the wish is edited, the value of the hidden field must change to the ID of the wish. To create this hidden field, add the following line to the top of the  `EditWish`  input form in  `editWish.php` :
 
 [source,php]
 ----
 
-<input type="hidden" name="wishID" value="<?php echo  ``$wish`` ["id"];?>" />
+<input type="hidden" name="wishID" value="<?php echo  `$wish` ["id"];?>" />
 ----
 
 
@@ -312,27 +309,35 @@
 
 *To update editWish.php so that it verifies if a wish is new and updates it if it is not new:*
 
-1. Add the  ``update_wish``  function to  ``db.php`` .
+1. Add the  `update_wish`  function to  `db.php` .
 
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function update_wish($wishID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($duedate==''){$this->query("UPDATE wishes SET description = '" . $description . "',due_date = NULL WHERE id = " . $wishID);} else$this->query("UPDATE wishes SET description = '" . $description ."', due_date = " . $this->format_date_for_sql($duedate). " WHERE id = " . $wishID);}  
+public function update_wish($wishID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($duedate==''){
+        $this->query("UPDATE wishes SET description = '" . $description . "',
+            due_date = NULL WHERE id = " . $wishID);
+    } else
+        $this->query("UPDATE wishes SET description = '" . $description .
+            "', due_date = " . $this->format_date_for_sql($duedate)
+            . " WHERE id = " . $wishID);
+}
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function update_wish($wishID, $description, $duedate) {
-    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 
-              'YYYY-MM-DD')  WHERE id = :wish_id_bv";
+    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 'YYYY-MM-DD') 
+                WHERE id = :wish_id_bv";
     $stid = oci_parse($this->con, $query);
     oci_bind_by_name($stid, ':wish_id_bv', $wishID);
     oci_bind_by_name($stid, ':desc_bv', $description);
@@ -341,21 +346,23 @@
 
 }
 ----
-2. Add the  ``get_wish_by_wish_id``  function to  ``db.php`` .
+2. Add the  `get_wish_by_wish_id`  function to  `db.php` .
 
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wish_by_wish_id ($wishID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);}
+public function get_wish_by_wish_id ($wishID) {
+    return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);
+}
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wish_by_wish_id($wishID) {
@@ -366,37 +373,51 @@
     return $stid;
 }
 ----
-3. In the main, top PHP block of  ``editWish.php`` , add a condition to the final `else` statement. This is the  ``else``  statement that inserts the wish to the database. Change it to an  ``else if``  statement:
+3. In the main, top PHP block of  `editWish.php` , add a condition to the final `else` statement. This is the  `else`  statement that inserts the wish to the database. Change it to an  `else if`  statement:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]=="") {WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;}
+else if ($_POST["wishID"]=="") {
+    WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
+}
 ----
-4. Type or paste another  ``else if``  statement below the one you just edited:
+4. Type or paste another  `else if`  statement below the one you just edited:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]!="") {WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;
+else if ($_POST["wishID"]!="") {
+    WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
 } 
 ----
 
-The code checks that the  ``wishID``  element in the  ``$_POST``  array is not an empty string, which means that the user was redirected from the  ``editWishList.php``  page by pressing the Edit button and that the user has filled in the description of the wish. If the check is successful, the code calls the function  ``update_wish``  with the input parameters  ``wishID`` ,  ``description`` , and  ``dueDate. `` These parameters are received from the HTML input form through the POST method. After  ``update_wish``  is called, the application is redirected to the  ``editWishList.php``  page and the PHP processing is canceled.
+The code checks that the  `wishID`  element in the  `$_POST`  array is not an empty string, which means that the user was redirected from the  `editWishList.php`  page by pressing the Edit button and that the user has filled in the description of the wish. If the check is successful, the code calls the function  `update_wish`  with the input parameters  `wishID` ,  `description` , and  `dueDate. ` These parameters are received from the HTML input form through the POST method. After  `update_wish`  is called, the application is redirected to the  `editWishList.php`  page and the PHP processing is canceled.
 
 
 == Testing the Edit Wish Functionality
 
 1. Run the application. On the index.php page, fill in the fields: in the Username field, enter "Tom", in the Password field, enter "tomcat".
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. Press the Edit My Wish List button. The  ``editWishList.php``  page opens.
+
+2. Press the Edit My Wish List button. The  `editWishList.php`  page opens.
+
 image::images/edit-wish-list-edit-wish.png[]
-3. Click Edit next to Icecream. The  ``editWish.php``  page opens.
+
+3. Click Edit next to Icecream. The  `editWish.php`  page opens.
 image::images/edit-wish.png[]
-4. Edit the fields and press Back to the List. The  ``editWishList.php``  page opens but the changes are not saved.
+4. Edit the fields and press Back to the List. The  `editWishList.php`  page opens but the changes are not saved.
 5. Press Edit next to Icecream. Clear the Describe your wish field and press Save Changes. An error message is displayed.
+
 image::images/editWishEmptyDescription.png[]
-6. Enter Chocolate icecream in the Describe your wish field and press Save Changes. The  ``editWishList.php``  page opens with the updated list.
+
+6. Enter Chocolate icecream in the Describe your wish field and press Save Changes. The  `editWishList.php`  page opens with the updated list.
+
 image::images/editWishListWishAdded.png[]
 
 
@@ -406,22 +427,24 @@
 
 *To enable the user to delete wishes:*
 
-1. Add a `` delete_wish``  function to  ``db.php`` .
+1. Add a ` delete_wish`  function to  `db.php` .
 
 *For the MySQL database:*
 
 
-[source,java]
+[source,php]
 ----
 
-function delete_wish ($wishID){$this->query("DELETE FROM wishes WHERE id = " . $wishID);}
+function delete_wish ($wishID){
+    $this->query("DELETE FROM wishes WHERE id = " . $wishID);
+}
 
 ----
 
 *For the Oracle database:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function delete_wish($wishID) {
@@ -431,32 +454,37 @@
     oci_execute($stid); 
 }
 ----
-2. Create a new PHP file named  ``deleteWish.php``  and enter the following code into the <? php ?> block:
-
-[source,java]
-----
-
-require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  ``editWishList.php`` ' );
-----
-The code enables the use of the  ``db.php``  file. It then calls the function  ``delete_wish``  from an instance of WishDB, with the  ``wishID``  as the input parameter. Finally, the application is redirected to the  ``editWishList.php``  page.
-3. To implement the Delete button, add another HTML table cell to the  ``while``  loop in  ``editWishList.php`` , directly below the code block for the  ``editWish``  button. The HTML input form contains a hidden field for the  ``wishID``  and a submit button labelled Delete. (Code for the MySQL database is shown, but the added code is the same and in the same location for Oracle Database.)
+2. Create a new PHP file named  `deleteWish.php`  and enter the following code into the <? php ?> block:
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+require_once("Includes/db.php");
+WishDB::getInstance()->delete_wish ($_POST["wishID"]);
+header('Location: editWishList.php' );
+----
+The code enables the use of the  `db.php`  file. It then calls the function  `delete_wish`  from an instance of WishDB, with the  `wishID`  as the input parameter. Finally, the application is redirected to the  `editWishList.php`  page.
+3. To implement the Delete button, add another HTML table cell to the  `while`  loop in  `editWishList.php` , directly below the code block for the  `editWish`  button. The HTML input form contains a hidden field for the  `wishID`  and a submit button labelled Delete. (Code for the MySQL database is shown, but the added code is the same and in the same location for Oracle Database.)
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-    *<td>
+    <td>
         <form name="deleteWish" action="deleteWish.php" method="POST">
             <input type="hidden" name="wishID" value="<?php echo $wishID; ?>"/>
             <input type="submit" name="deleteWish" value="Delete"/>
         </form>
-    </td>*
+    </td>
     <?php
     echo "</tr>\n";
     endwhile;
@@ -465,7 +493,7 @@
 </table>
 ----
 
-The entire table, including the form with the Edit button inside the  ``while `` loop, now looks like this:
+The entire table, including the form with the Edit button inside the  `while ` loop, now looks like this:
 
 *For the MySQL database:*
 
@@ -480,7 +508,7 @@
     $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
     while($row = mysqli_fetch_array($result)):
-        echo "<tr><td>" . htmlentities($row['description") . "</td>";
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
         echo "<td>" . htmlentities($row['due_date']) . "</td>";
         $wishID = $row["id"];
     ?>
@@ -544,16 +572,16 @@
 
 == Testing the Delete Wish Functionality
 
-To check that the functionality is implemented correctly, press Delete next to any item on the  ``editWishList.php``  page. The item is no longer on the list.
+To check that the functionality is implemented correctly, press Delete next to any item on the  `editWishList.php`  page. The item is no longer on the list.
 
 image::images/deleteWish.png[]
 
 
 == Application Source Code after the Current Lesson Is Completed
 
-MySQL users: Click link:https://netbeans.org/files/documents/4/1933/lesson7.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+MySQL users: Click link:https://netbeans.org/files/documents/4/1933/lesson7.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson7.zip[+ here+] to download the source code that reflects the project state after the lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson7.zip[+here+] to download the source code that reflects the project state after the lesson is completed.
 
 
 == Next Steps
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ja.asciidoc
index 83bb34d..1f79ea4 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ja.asciidoc
@@ -42,32 +42,10 @@
 :keywords: Apache NetBeans, Tutorials, レッスン7: データベース内のエントリの更新および削除
 
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. 
-link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. 
-*=> データベース内のエントリの更新および削除*
-
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 このレッスンでは、次の2つの機能を使用してアプリケーションの機能を拡張します。
 
 
-これらの機能を実装するには、 ``editWishList.php`` ファイルと ``editWish.php`` ファイルを編集します。また、 ``deleteWish.php`` という名前の新しいファイルも作成します。
+これらの機能を実装するには、 `editWishList.php` ファイルと `editWish.php` ファイルを編集します。また、 `deleteWish.php` という名前の新しいファイルも作成します。
 
 image::images/page-flow-diagram-l7.png[]
 
@@ -86,85 +64,109 @@
 
 この機能は、次のユース・ケースをサポートしています。
 
-*  ``editWishList.php`` ページで、ユーザーがウィッシュの右にある「Edit」ボタンを押す。選択したウィッシュのデータがある ``editWish.php`` ページが開く。
+*  `editWishList.php` ページで、ユーザーがウィッシュの右にある「Edit」ボタンを押す。選択したウィッシュのデータがある `editWish.php` ページが開く。
 * ユーザーがウィッシュの説明または期日(あるいはその両方)を変更し、「Save Changes」ボタンを押す。
-* 説明が入力されて_いない_場合、エラー・メッセージが表示され、ユーザーが ``editWish.php`` ページに戻される。
-* 説明が入力されている場合、アプリケーションはウィッシュが更新される ``editWishList.php`` ページに戻る。
+* 説明が入力されて_いない_場合、エラー・メッセージが表示され、ユーザーが `editWish.php` ページに戻される。
+* 説明が入力されている場合、アプリケーションはウィッシュが更新される `editWishList.php` ページに戻る。
 
 この実装は、次の手順から構成されます。
 
-* <<addEditButton,editWishListページに「Edit」ボタンを追加する>>
-* <<wishArrayUpdate,editWish.phpページで、ウィッシュのデータを格納する配列$wishを更新する>>
-* <<updateInputForm,editWish.phpページの入力フォームを更新する>>
-* <<updateWishRecord,送信されたデータを検証し、データベース内のウィッシュを更新する>>
-
+* <<_implementing_the_edit_button,editWishListページに「Edit」ボタンを追加する>>
+* <<_expanding_the_code_wish_code_array,editWish.phpページで、ウィッシュのデータを格納する配列$wishを更新する>>
+* <<_updating_the_html_input_form,editWish.phpページの入力フォームを更新する>>
+* <<_updating_the_wish_in_the_database,送信されたデータを検証し、データベース内のウィッシュを更新する>>
 
 === 「Edit」ボタンの実装
 
- ``editWishList.php`` では、ウィッシャのウィッシュを含む表は、ウィッシュがデータベースから選択されるときに、ウィッシュを含む行を表示するループ( ``while`` 文)によって実装されています。行の一番右のセルとして「Edit」ボタンを追加します。
+ `editWishList.php` では、ウィッシャのウィッシュを含む表は、ウィッシュがデータベースから選択されるときに、ウィッシュを含む行を表示するループ( `while` 文)によって実装されています。行の一番右のセルとして「Edit」ボタンを追加します。
 
-1. HTML入力フォームを使用してウィッシュのIDを転送するには、そのIDを変数に格納します。次のコード行を ``while`` ループの末尾に入力します。
+1. HTML入力フォームを使用してウィッシュのIDを転送するには、そのIDを変数に格納します。次のコード行を `while` ループの末尾に入力します。
 
-[source,java]
+[source,php]
 ----
-
-while ($row = ...) {echo ...echo ...*$wishID = $row["id"];*}
-?>
+while ($row = mysqli_fetch_array($result)):
+    echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+    echo "<td>" . htmlentities($row['due_date']) . "</td>";
+    $wishID = $row['id'];
+    echo "<td>WishID=" . $wishID . "</td>";
+    //The loop is left open
+    ?>
 ----
-2. 編集ボタンを実装します。editWishフォームを使用して、終了の</table>タグの前に別の表のセルを追加します。このフォームには、ボタン・コンポーネントと、ボタンがクリックされたときに ``$wishID`` の値を送信する非表示コンポーネントが含まれています。(MySQLデータベース用のコードが示されていますが、追加されるコードはOracleデータベースの場合も同じで、同じ場所になります。)
+2. 編集ボタンを実装します。editWishフォームを使用して、終了の</table>タグの前に別の表のセルを追加します。このフォームには、ボタン・コンポーネントと、ボタンがクリックされたときに `$wishID` の値を送信する非表示コンポーネントが含まれています。(MySQLデータベース用のコードが示されていますが、追加されるコードはOracleデータベースの場合も同じで、同じ場所になります。)
 
 [source,php]
 ----
 
-   Hello <?php echo $_SESSION["user"]; ?><br/><table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while ($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";}mysqli_free_result($result);?>
-            *<td>
-                <form name="editWish" action="editWish.php" method="GET">
-                    <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-                    <input type="submit" name="editWish" value="Edit">
-                    </form>
-            </td>*</table>
-----
-3.  ``while`` ループを変更してlink:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+代替構文+]を使用します。これにより、 ``while`` ループ内のHTMLブロックを実行しやすくなります。代替の ``while`` ループ構文では、開始の中括弧{がコロン(:)に置き換えられ、終了の中括弧}が ``endwhile;`` 文に置き換えられます。開始の中括弧をコロンに置き換え、終了の中括弧を削除し、 ``endwhile;`` 文を使用して終了の</table>タグの前に新しいPHPブロックを追加します。これにより、新しい表のセルが ``while`` ループに組み込まれます。結果または文を解放するコードを ``endwhile;`` 文の後に移動します。(ここでも、MySQL用のコードが示されていますが、コード変更および場所はOracleデータベースの場合も同じです。)
-
-[source,php]
-----
-
-    while ($row = mysqli_fetch_array($result))[.line-through]#{#*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";[.line-through]#    }mysqli_free_result($result);#?>
+Hello <?php echo $_SESSION["user"]; ?><br/>
+<table border="black">
+    <tr><th>Item</th><th>Due Date</th></tr>
+    <?php
+    require_once("Includes/db.php");
+    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-           <input type="submit" name="editWish" value="Edit">
+            <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-*    <?php
-    endwhile;
-    mysqli_free_result($result);
-    ?>*
 </table>
 ----
-4. 
-表の行の構文を修正します。行を終了する</tr>\n文字を、期日のecho文から ``endwhile;`` のすぐ上の新しいecho文に移動します。
-
+3.  `while` ループを変更してlink:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+代替構文+]を使用します。これにより、 `while` ループ内のHTMLブロックを実行しやすくなります。代替の `while` ループ構文では、開始の中括弧{がコロン(:)に置き換えられ、終了の中括弧}が `endwhile;` 文に置き換えられます。開始の中括弧をコロンに置き換え、終了の中括弧を削除し、 `endwhile;` 文を使用して終了の</table>タグの前に新しいPHPブロックを追加します。これにより、新しい表のセルが `while` ループに組み込まれます。結果または文を解放するコードを `endwhile;` 文の後に移動します。(ここでも、MySQL用のコードが示されていますが、コード変更および場所はOracleデータベースの場合も同じです。)
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+   while ($row = mysqli_fetch_array($result)){:
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
     <?php
-    *echo "</tr>\n";*
+    endwhile;
+    mysqli_free_result($result);
+    ?>
+</table>
+----
+4. 
+表の行の構文を修正します。行を終了する</tr>\n文字を、期日のecho文から `endwhile;` のすぐ上の新しいecho文に移動します。
+
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
+    <td>
+        <form name="editWish" action="editWish.php" method="GET">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+           <input type="submit" name="editWish" value="Edit">
+        </form>
+    </td>
+    <?php
+    echo "</tr>\n";
     endwhile;
     mysqli_free_result($result);
     ?>
 </table>
 ----
 5. 
- ``while`` ループ内に「Edit」ボタンを持つフォームを含む表の全体は、次のようになります。
+ `while` ループ内に「Edit」ボタンを持つフォームを含む表の全体は、次のようになります。
 
 *MySQLデータベースの場合:*
 
@@ -197,6 +199,7 @@
 </table>
 ----
 
+
 *Oracleデータベースの場合:*
 
 
@@ -235,13 +238,13 @@
 ----
 
 
-===  ``$wish`` 配列の拡張
+===  `$wish` 配列の拡張
 
- ``editWishList.php`` ページで「Edit」ボタンを押すと、選択したウィッシュのIDがサーバー・リクエスト・メソッドGETを介して ``editWish.php`` ページに転送されます。ウィッシュのIDを格納するには、 ``$wish`` 配列に新しい要素を追加する必要があります。
+ `editWishList.php` ページで「Edit」ボタンを押すと、選択したウィッシュのIDがサーバー・リクエスト・メソッドGETを介して `editWish.php` ページに転送されます。ウィッシュのIDを格納するには、 `$wish` 配列に新しい要素を追加する必要があります。
 
-新しいウィッシュを追加するときに、それを保存しようとして失敗した後で、 ``editWishList.php`` ページと ``editWish.php`` ページの両方から入力フォームにアクセスできます。データを転送するサーバー・リクエスト・メソッドによって、ケースが識別されます。GETは、ユーザーが「Edit Wish」を押して最初にページに達するときに、フォームが表示されることを示します。POSTは、説明なしでウィッシュを保存しようとした後、ユーザーがフォームにリダイレクトされることを示します。
+新しいウィッシュを追加するときに、それを保存しようとして失敗した後で、 `editWishList.php` ページと `editWish.php` ページの両方から入力フォームにアクセスできます。データを転送するサーバー・リクエスト・メソッドによって、ケースが識別されます。GETは、ユーザーが「Edit Wish」を押して最初にページに達するときに、フォームが表示されることを示します。POSTは、説明なしでウィッシュを保存しようとした後、ユーザーがフォームにリダイレクトされることを示します。
 
- ``editWish.php`` 内で、HTML <body>内の ``EditWish`` 入力フォームの上にあるPHPブロックを、 ``$wish`` 配列の拡張されたコードで置き換えます。
+ `editWish.php` 内で、HTML <body>内の `EditWish` 入力フォームの上にあるPHPブロックを、 `$wish` 配列の拡張されたコードで置き換えます。
 
 *MySQLデータベースの場合:*
 
@@ -249,8 +252,15 @@
 [source,php]
 ----
 
-<?phpif ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("id" => $_POST["wishID"], "description" => 
-        $_POST["wish"], "due_date" => $_POST["dueDate"]);else if (array_key_exists("wishID", $_GET))$wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));else$wish = array("id" => "", "description" => "", "due_date" => "");?>
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "POST")
+    $wish = array("id" => $_POST["wishID"], "description" => 
+            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+else if (array_key_exists("wishID", $_GET))
+    $wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));
+else
+    $wish = array("id" => "", "description" => "", "due_date" => "");
+?>
 ----
 
 *Oracleデータベースの場合:*
@@ -262,7 +272,7 @@
 <?php
 if ($_SERVER["REQUEST_METHOD"] == "POST")
     $wish = array("id" => $_POST["wishID"], "description" =>
-            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+                $_POST["wish"], "due_date" => $_POST["dueDate"]);
 else if (array_key_exists("wishID", $_GET)) {
     $stid = WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]);
     $row = oci_fetch_array($stid, OCI_ASSOC);
@@ -270,23 +280,23 @@
                 $row["DESCRIPTION"], "due_date" => $row["DUE_DATE"]);
     oci_free_statement($stid);
 } else
-$wish = array("id" => "", "description" => "", "due_date" => "");
+    $wish = array("id" => "", "description" => "", "due_date" => "");
 ?>
 ----
 
-このコードは、 ``id`` 、 ``description`` 、および ``due_date`` の3つの要素を持つ ``$wish`` 配列を初期化します。これらの要素の値はサーバー・リクエスト・メソッドに依存します。サーバー・リクエスト・メソッドがPOSTの場合、値は入力フォームから受け取ります。また、サーバー・リクエスト・メソッドがGETで、$_GET配列にキー「wishID」を持つ要素が含まれている場合、値は関数get_wish_by_wish_idによってデータベースから取得されます。最後に、サーバー・リクエスト・メソッドがPOSTおよびGET以外の場合、つまり新しいウィッシュの追加のユース・ケースが行われた場合、要素は空になります。
+このコードは、 `id` 、 `description` 、および `due_date` の3つの要素を持つ `$wish` 配列を初期化します。これらの要素の値はサーバー・リクエスト・メソッドに依存します。サーバー・リクエスト・メソッドがPOSTの場合、値は入力フォームから受け取ります。また、サーバー・リクエスト・メソッドがGETで、$_GET配列にキー「wishID」を持つ要素が含まれている場合、値は関数get_wish_by_wish_idによってデータベースから取得されます。最後に、サーバー・リクエスト・メソッドがPOSTおよびGET以外の場合、つまり新しいウィッシュの追加のユース・ケースが行われた場合、要素は空になります。
 
 前述のコードは、ウィッシュを作成および編集するケースをカバーしています。また、入力フォームを両方のケースに使用できるように、入力フォームを更新する必要があります。
 
 
 === HTML入力フォームの更新
 
-現時点では、新しいウィッシュを作成するとき、ウィッシュIDがなくても入力フォームは機能します。既存のウィッシュを編集する場合にフォームが機能するようにするには、ウィッシュのIDを転送するための非表示フィールドを追加する必要があります。非表示フィールドの値は、$wish配列から取得されます。新しいウィッシュの作成中、この値は空の文字列です。ウィッシュが編集される場合、非表示フィールドの値がウィッシュのIDに変わります。この非表示フィールドを作成するには、 ``editWish.php`` の ``EditWish`` 入力フォームの先頭に次の行を追加します。
+現時点では、新しいウィッシュを作成するとき、ウィッシュIDがなくても入力フォームは機能します。既存のウィッシュを編集する場合にフォームが機能するようにするには、ウィッシュのIDを転送するための非表示フィールドを追加する必要があります。非表示フィールドの値は、$wish配列から取得されます。新しいウィッシュの作成中、この値は空の文字列です。ウィッシュが編集される場合、非表示フィールドの値がウィッシュのIDに変わります。この非表示フィールドを作成するには、 `editWish.php` の `EditWish` 入力フォームの先頭に次の行を追加します。
 
 [source,php]
 ----
 
-<input type="hidden" name="wishID" value="<?php echo  ``$wish`` ["id"];?>" />
+<input type="hidden" name="wishID" value="<?php echo  `$wish` ["id"];?>" />
 ----
 
 
@@ -301,27 +311,35 @@
 
 *ウィッシュが新規であるかどうかを確認し、新規でない場合はウィッシュを更新するようにeditWish.phpを更新するには:*
 
-1.  ``update_wish`` 関数を ``db.php`` に追加します。
+1.  `update_wish` 関数を `db.php` に追加します。
 
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function update_wish($wishID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($duedate==''){$this->query("UPDATE wishes SET description = '" . $description . "',due_date = NULL WHERE id = " . $wishID);} else$this->query("UPDATE wishes SET description = '" . $description ."', due_date = " . $this->format_date_for_sql($duedate). " WHERE id = " . $wishID);}  
+public function update_wish($wishID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($duedate==''){
+        $this->query("UPDATE wishes SET description = '" . $description . "',
+            due_date = NULL WHERE id = " . $wishID);
+    } else
+        $this->query("UPDATE wishes SET description = '" . $description .
+            "', due_date = " . $this->format_date_for_sql($duedate)
+            . " WHERE id = " . $wishID);
+}
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function update_wish($wishID, $description, $duedate) {
-    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 
-              'YYYY-MM-DD')  WHERE id = :wish_id_bv";
+    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 'YYYY-MM-DD') 
+                WHERE id = :wish_id_bv";
     $stid = oci_parse($this->con, $query);
     oci_bind_by_name($stid, ':wish_id_bv', $wishID);
     oci_bind_by_name($stid, ':desc_bv', $description);
@@ -331,21 +349,22 @@
 }
 ----
 2. 
- ``get_wish_by_wish_id`` 関数を ``db.php`` に追加します。
+ `get_wish_by_wish_id` 関数を `db.php` に追加します。
 
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wish_by_wish_id ($wishID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);}
+public function get_wish_by_wish_id ($wishID) {
+    return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);
+}
 ----
-
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wish_by_wish_id($wishID) {
@@ -356,37 +375,53 @@
     return $stid;
 }
 ----
-3.  ``editWish.php`` のメインとなる先頭のPHPブロックで、最後の`else`文に条件を追加します。これはデータベースにウィッシュを挿入する ``else`` 文です。これを ``else if`` 文に変更します。
+3.  `editWish.php` のメインとなる先頭のPHPブロックで、最後の`else`文に条件を追加します。これはデータベースにウィッシュを挿入する `else` 文です。これを `else if` 文に変更します。
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]=="") {WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;}
+else if ($_POST["wishID"]=="") {
+    WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
+}
 ----
-4. 別の ``else if`` 文を、前に編集した文の下に入力するか、または貼り付けます。
+4. 別の `else if` 文を、前に編集した文の下に入力するか、または貼り付けます。
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]!="") {WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;
+else if ($_POST["wishID"]!="") {
+    WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
 } 
 ----
 
-このコードは、 ``$_POST`` 配列内の ``wishID`` 要素が空の文字列ではないことを確認します(これは、ユーザーが「Edit」ボタンを押すことによって ``editWishList.php`` ページからリダイレクトされたこと、および、ユーザーがウィッシュの説明を入力していたことを意味します)。確認が成功すると、コードは入力パラメータ ``wishID`` 、 ``description`` 、および ``dueDate`` を使用して関数 ``update_wish`` をコールします。これらのパラメータは、HTML入力フォームからPOSTメソッドを介して受け取ります。 ``update_wish`` がコールされた後、アプリケーションは ``editWishList.php`` ページにリダイレクトされ、PHP処理は取り消されます。
+このコードは、 `$_POST` 配列内の `wishID` 要素が空の文字列ではないことを確認します(これは、ユーザーが「Edit」ボタンを押すことによって `editWishList.php` ページからリダイレクトされたこと、および、ユーザーがウィッシュの説明を入力していたことを意味します)。確認が成功すると、コードは入力パラメータ `wishID` 、 `description` 、および `dueDate` を使用して関数 `update_wish` をコールします。これらのパラメータは、HTML入力フォームからPOSTメソッドを介して受け取ります。 `update_wish` がコールされた後、アプリケーションは `editWishList.php` ページにリダイレクトされ、PHP処理は取り消されます。
 
 
 == ウィッシュの編集機能のテスト
 
 1. アプリケーションを実行します。index.phpページで、「Username」フィールドに「Tom」、「Password」フィールドに「tomcat」と入力します。
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. 「Edit My Wish List」ボタンを押します。 ``editWishList.php`` ページが開きます。
+
+2. 「Edit My Wish List」ボタンを押します。 `editWishList.php` ページが開きます。
+
 image::images/edit-wish-list-edit-wish.png[]
-3. 「Icecream」の横の「Edit」をクリックします。 ``editWish.php`` ページが開きます。
+
+3. 「Icecream」の横の「Edit」をクリックします。 `editWish.php` ページが開きます。
+
 image::images/edit-wish.png[]
-4. フィールドを編集して「Back to the List」を押します。 ``editWishList.php`` ページが開きますが、変更は保存されていません。
+
+4. フィールドを編集して「Back to the List」を押します。 `editWishList.php` ページが開きますが、変更は保存されていません。
 5. 「Icecream」の横の「Edit」を押します。「Describe your wish」フィールドをクリアして「Save Changes」を押します。エラー・メッセージが表示されます。
+
 image::images/editWishEmptyDescription.png[]
-6. 「Describe your wish」フィールドに「Chocolate icecream」と入力し、「Save Changes」を押します。 ``editWishList.php`` ページが開き、更新されたリストが表示されます。
+
+6. 「Describe your wish」フィールドに「Chocolate icecream」と入力し、「Save Changes」を押します。 `editWishList.php` ページが開き、更新されたリストが表示されます。
+
 image::images/editWishListWishAdded.png[]
 
 
@@ -396,22 +431,24 @@
 
 *ユーザーがウィッシュを削除できるようにするには:*
 
-1.  ``delete_wish`` 関数を ``db.php`` に追加します。
+1.  `delete_wish` 関数を `db.php` に追加します。
 
 *MySQLデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
-function delete_wish ($wishID){$this->query("DELETE FROM wishes WHERE id = " . $wishID);}
+function delete_wish ($wishID){
+    $this->query("DELETE FROM wishes WHERE id = " . $wishID);
+}
 
 ----
 
 *Oracleデータベースの場合:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function delete_wish($wishID) {
@@ -421,32 +458,37 @@
     oci_execute($stid); 
 }
 ----
-2.  ``deleteWish.php`` という名前の新しいPHPファイルを作成し、次のコードを<?php?>ブロック内に入力します。
-
-[source,java]
-----
-
-require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  ``editWishList.php`` ' );
-----
-このコードにより、 ``db.php`` ファイルが使用できるようになります。入力パラメータとして ``wishID`` を使用し、WishDBのインスタンスから ``delete_wish`` 関数をコールします。最後に、アプリケーションが ``editWishList.php`` ページにリダイレクトされます。
-3. 「Delete」ボタンを実装するには、別のHTML表のセルを、 ``editWishList.php`` の ``while`` ループの内部で、 ``editWish`` ボタンのコード・ブロックのすぐ下に追加します。HTML入力フォームには、 ``wishID`` 用の非表示フィールドと、「Delete」というラベルが付いた送信ボタンが含まれています。(MySQLデータベース用のコードが示されていますが、追加されるコードはOracleデータベースの場合も同じで、同じ場所になります。)
+2.  `deleteWish.php` という名前の新しいPHPファイルを作成し、次のコードを<?php?>ブロック内に入力します。
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+require_once("Includes/db.php");
+WishDB::getInstance()->delete_wish ($_POST["wishID"]);
+header('Location: editWishList.php' );
+----
+このコードにより、 `db.php` ファイルが使用できるようになります。入力パラメータとして `wishID` を使用し、WishDBのインスタンスから `delete_wish` 関数をコールします。最後に、アプリケーションが `editWishList.php` ページにリダイレクトされます。
+3. 「Delete」ボタンを実装するには、別のHTML表のセルを、 `editWishList.php` の `while` ループの内部で、 `editWish` ボタンのコード・ブロックのすぐ下に追加します。HTML入力フォームには、 `wishID` 用の非表示フィールドと、「Delete」というラベルが付いた送信ボタンが含まれています。(MySQLデータベース用のコードが示されていますが、追加されるコードはOracleデータベースの場合も同じで、同じ場所になります。)
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-    *<td>
+    <td>
         <form name="deleteWish" action="deleteWish.php" method="POST">
             <input type="hidden" name="wishID" value="<?php echo $wishID; ?>"/>
             <input type="submit" name="deleteWish" value="Delete"/>
         </form>
-    </td>*
+    </td>
     <?php
     echo "</tr>\n";
     endwhile;
@@ -455,7 +497,7 @@
 </table>
 ----
 
- ``while`` ループ内に「Edit」ボタンを持つフォームを含む表の全体は、次のようになります。
+ `while` ループ内に「Edit」ボタンを持つフォームを含む表の全体は、次のようになります。
 
 *MySQLデータベースの場合:*
 
@@ -470,7 +512,7 @@
     $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
     while($row = mysqli_fetch_array($result)):
-        echo "<tr><td>" . htmlentities($row['description") . "</td>";
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
         echo "<td>" . htmlentities($row['due_date']) . "</td>";
         $wishID = $row["id"];
     ?>
@@ -534,7 +576,7 @@
 
 == ウィッシュの削除機能のテスト
 
-機能が正しく実装されたことを確認するには、 ``editWishList.php`` ページで任意の項目の横にある「Delete」を押します。その項目がリストに表示されなくなります。
+機能が正しく実装されたことを確認するには、 `editWishList.php` ページで任意の項目の横にある「Delete」を押します。その項目がリストに表示されなくなります。
 
 image::images/deleteWish.png[]
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_pt_BR.asciidoc
index 68fa444..eb288ab 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_pt_BR.asciidoc
@@ -42,39 +42,16 @@
 :keywords: Apache NetBeans, Tutorials, Lição 7: Atualizando e Deletando Entradas no Banco de Dados
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. 
-link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário de Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. 
-*=> Atualizando e Deletando Entradas no Banco de Dados*
-
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
 Nesta lição, você expandirá a funcionalidade da aplicação com duas funcionalidades:
 
 
-Para implementar essas funcionalidades, edite os arquivos  ``editWishList.php``  e  ``editWish.php`` . Crie também um novo arquivo chamado  ``deleteWish.php`` .
+Para implementar essas funcionalidades, edite os arquivos  `editWishList.php`  e  `editWish.php` . Crie também um novo arquivo chamado  `deleteWish.php` .
 
 image::images/page-flow-diagram-l7.png[]
 
 O documento atual é uma parte do tutorial Criando uma Aplicação CRUD no NetBeans IDE para PHP.
 
 
-
 == Código-fonte da Aplicação da Lição Anterior
 
 Usuários MySQL: clique link:https://netbeans.org/files/documents/4/1932/lesson6.zip[+aqui+] para fazer o download do código-fonte que reflete o estado do projeto depois que a lição anterior estiver concluída.
@@ -86,85 +63,111 @@
 
 A funcionalidade suporta o seguinte caso de uso:
 
-* Na página  ``editWishList.php`` , o usuário pressiona o botão Editar à direita de um desejo. A página  ``editWish.php``  com os dados do desejo selecionado abre.
+* Na página  `editWishList.php` , o usuário pressiona o botão Editar à direita de um desejo. A página  `editWish.php`  com os dados do desejo selecionado abre.
 * O usuário altera a descrição e/ou a data de vencimento do desejo e pressiona o botão Salvar Alterações.
-* Se a descrição _não_ for preenchida, uma mensagem de erro é exibida e o usuário retorna para a página  ``editWish.php`` .
-* Se a descrição for preenchida, a aplicação retorna à página  ``editWishList.php`` , onde o desejo é atualizado.
+* Se a descrição _não_ for preenchida, uma mensagem de erro é exibida e o usuário retorna para a página  `editWish.php` .
+* Se a descrição for preenchida, a aplicação retorna à página  `editWishList.php` , onde o desejo é atualizado.
 
 A implementação consiste nas seguintes etapas:
 
-* <<addEditButton,Adicionar um botão Editar na página editWishList>>
-* <<wishArrayUpdate,Na página editWish.php, atualizar o array $wish para armazenar os dados do desejo>>
-* <<updateInputForm,Atualizar o form de entrada na página editWish.php>>
-* <<updateWishRecord,Validar os dados enviados e atualizar o desejo no banco de dados>>
+* <<_implementing_the_edit_button,Adicionar um botão Editar na página editWishList>>
+* <<_expanding_the_code_wish_code_array,Na página editWish.php, atualizar o array $wish para armazenar os dados do desejo>>
+* <<_updating_the_html_input_form,Atualizar o form de entrada na página editWish.php>>
+* <<_updating_the_wish_in_the_database,Validar os dados enviados e atualizar o desejo no banco de dados>>
 
 
 === Implementando o Botão Editar
 
-Em  ``editWishList.php`` , uma tabela com os desejos de um wisher é implementada por um loop (uma instrução  ``while`` ) que exibe linhas com desejos enquanto os desejos são selecionados no banco de dados. Adicione um botão Editar como a célula da extrema direita em uma linha.
+Em  `editWishList.php` , uma tabela com os desejos de um wisher é implementada por um loop (uma instrução  `while` ) que exibe linhas com desejos enquanto os desejos são selecionados no banco de dados. Adicione um botão Editar como a célula da extrema direita em uma linha.
 
-1. Para transferir o ID de um desejo usando o form de entrada HTML, armazene-o em uma variável. Insira a seguinte linha de código no fim do loop  ``while`` :
+1. Para transferir o ID de um desejo usando o form de entrada HTML, armazene-o em uma variável. Insira a seguinte linha de código no fim do loop  `while` :
 
-[source,java]
+[source,php]
 ----
-
-while ($row = ...) {echo ...echo ...*$wishID = $row["id"];*}
-?>
+while ($row = mysqli_fetch_array($result)):
+    echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+    echo "<td>" . htmlentities($row['due_date']) . "</td>";
+    $wishID = $row['id'];
+    echo "<td>WishID=" . $wishID . "</td>";
+    //The loop is left open
+    ?>
 ----
-2. Implemente o botão Editar. Adicione outra célula à tabela antes de fechar a tag </table> com o form editWish. Esse form contém um componente botão e um componente oculto que envia o valor  ``$wishID``  ao clicar no botão. (O código para o banco de dados MySQL é mostrado, mas o código adicionado é o mesmo, no mesmo local, para o banco de dados Oracle).
+2. Implemente o botão Editar. Adicione outra célula à tabela antes de fechar a tag </table> com o form editWish. Esse form contém um componente botão e um componente oculto que envia o valor  `$wishID`  ao clicar no botão. (O código para o banco de dados MySQL é mostrado, mas o código adicionado é o mesmo, no mesmo local, para o banco de dados Oracle).
 
 [source,php]
 ----
 
-   Hello <?php echo $_SESSION["user"]; ?><br/><table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while ($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";}mysqli_free_result($result);?>
-            *<td>
-                <form name="editWish" action="editWish.php" method="GET">
-                    <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-                    <input type="submit" name="editWish" value="Edit">
-                    </form>
-            </td>*</table>
-----
-3. Altere o loop  ``while``  para usar a link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+sintaxe alternativa+]. Isso facilita a execução de blocos HTML dentro do loop  ``while`` . Na sintaxe alternativa do loop  ``while`` , as chaves de abertura { são substituídas por dois-pontos : e as chaves de fechamento } são substituídas pela instrução  ``endwhile;`` . Substitua as chaves de abertura por dois-pontos, delete as chaves de fechamento e adicione um novo bloco PHP antes da tag de fechamento </table> com a instrução  ``endwhile;`` . Isso incorpora a nova célula da tabela para o loop  ``while`` . Mova o código instrução livre/resultado para após a instrução  ``endwhile.``  (O código para o MySQL é exibido novamente, mas o código muda e o local é o mesmo para o banco de dados da Oracle).
-
-[source,php]
-----
-
-    while ($row = mysqli_fetch_array($result))[.line-through]#{#*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";[.line-through]#    }mysqli_free_result($result);#?>
+Hello <?php echo $_SESSION["user"]; ?><br/>
+<table border="black">
+    <tr><th>Item</th><th>Due Date</th></tr>
+    <?php
+    require_once("Includes/db.php");
+    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-           <input type="submit" name="editWish" value="Edit">
+            <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-*    <?php
-    endwhile;
-    mysqli_free_result($result);
-    ?>*
 </table>
 ----
-4. 
-Conserte a sintaxe da linha da tabela. Mova os caracteres de final de linha </tr>\n da instrução de exibição de data de vencimento para a nova instrução logo acima do  ``endwhile;`` .
 
+3. Altere o loop  `while`  para usar a link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+sintaxe alternativa+]. Isso facilita a execução de blocos HTML dentro do loop  `while` . Na sintaxe alternativa do loop  `while` , as chaves de abertura { são substituídas por dois-pontos : e as chaves de fechamento } são substituídas pela instrução  `endwhile;` . Substitua as chaves de abertura por dois-pontos, delete as chaves de fechamento e adicione um novo bloco PHP antes da tag de fechamento </table> com a instrução  `endwhile;` . Isso incorpora a nova célula da tabela para o loop  `while` . Mova o código instrução livre/resultado para após a instrução  `endwhile.`  (O código para o MySQL é exibido novamente, mas o código muda e o local é o mesmo para o banco de dados da Oracle).
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+   while ($row = mysqli_fetch_array($result)){:
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
     <?php
-    *echo "</tr>\n";*
+    endwhile;
+    mysqli_free_result($result);
+    ?>
+</table>
+----
+4. 
+Conserte a sintaxe da linha da tabela. Mova os caracteres de final de linha </tr>\n da instrução de exibição de data de vencimento para a nova instrução logo acima do  `endwhile;` .
+
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
+    <td>
+        <form name="editWish" action="editWish.php" method="GET">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+           <input type="submit" name="editWish" value="Edit">
+        </form>
+    </td>
+    <?php
+    echo "</tr>\n";
     endwhile;
     mysqli_free_result($result);
     ?>
 </table>
 ----
 5. 
-A tabela inteira, incluindo o form com o botão Editar dentro do loop  ``while `` , agora tem a seguinte aparência:
+A tabela inteira, incluindo o form com o botão Editar dentro do loop  `while ` , agora tem a seguinte aparência:
 
 *Para o banco de dados MySQL:*
 
@@ -235,13 +238,13 @@
 ----
 
 
-=== Expandindo o Array  ``$wish`` 
+=== Expandindo o Array  `$wish` 
 
-Quando o botão Editar é pressionado na página  ``editWishList.php`` , o wisher ID selecionado é transferido para a página  ``editWish.php``  usando o método de Solicitação de Servidor GET. Para armazenar o wisher ID, você precisa adicionar um novo elemento ao array  ``$wish`` .
+Quando o botão Editar é pressionado na página  `editWishList.php` , o wisher ID selecionado é transferido para a página  `editWish.php`  usando o método de Solicitação de Servidor GET. Para armazenar o wisher ID, você precisa adicionar um novo elemento ao array  `$wish` .
 
-Como acontece quando um novo desejo é adicionado, o form de entrada pode ser acessado da página  ``editWishList.php``  e da página  ``editWish.php``  após uma tentativa malsucedida de salvar. Os casos são distinguidos pelo método de Solicitação de Servidor por meio do qual os dados são transferidos. O GET indica que o form é exibido quando o usuário chega pela primeira vez à página, pressionando Editar Desejo. O POST indica que o usuário é redirecionado para o form após tentar salvar um desejo sem uma descrição.
+Como acontece quando um novo desejo é adicionado, o form de entrada pode ser acessado da página  `editWishList.php`  e da página  `editWish.php`  após uma tentativa malsucedida de salvar. Os casos são distinguidos pelo método de Solicitação de Servidor por meio do qual os dados são transferidos. O GET indica que o form é exibido quando o usuário chega pela primeira vez à página, pressionando Editar Desejo. O POST indica que o usuário é redirecionado para o form após tentar salvar um desejo sem uma descrição.
 
-Em  ``editWish.php`` , substitua o bloco PHP na tag HTML <body> acima do form de entrada  ``EditWish``  com o código expandido para o array  ``$wish`` .
+Em  `editWish.php` , substitua o bloco PHP na tag HTML <body> acima do form de entrada  `EditWish`  com o código expandido para o array  `$wish` .
 
 *Para o banco de dados MySQL:*
 
@@ -249,8 +252,15 @@
 [source,php]
 ----
 
-<?phpif ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("id" => $_POST["wishID"], "description" => 
-        $_POST["wish"], "due_date" => $_POST["dueDate"]);else if (array_key_exists("wishID", $_GET))$wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));else$wish = array("id" => "", "description" => "", "due_date" => "");?>
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "POST")
+    $wish = array("id" => $_POST["wishID"], "description" => 
+            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+else if (array_key_exists("wishID", $_GET))
+    $wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));
+else
+    $wish = array("id" => "", "description" => "", "due_date" => "");
+?>
 ----
 
 *Para o banco de dados Oracle:*
@@ -262,7 +272,7 @@
 <?php
 if ($_SERVER["REQUEST_METHOD"] == "POST")
     $wish = array("id" => $_POST["wishID"], "description" =>
-            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+                $_POST["wish"], "due_date" => $_POST["dueDate"]);
 else if (array_key_exists("wishID", $_GET)) {
     $stid = WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]);
     $row = oci_fetch_array($stid, OCI_ASSOC);
@@ -270,23 +280,23 @@
                 $row["DESCRIPTION"], "due_date" => $row["DUE_DATE"]);
     oci_free_statement($stid);
 } else
-$wish = array("id" => "", "description" => "", "due_date" => "");
+    $wish = array("id" => "", "description" => "", "due_date" => "");
 ?>
 ----
 
-O código inicializa o array  ``$wish``  com três elementos:  ``id`` ,  ``description``  e  ``due_date`` . Os valores desses elementos dependem do método de Solicitação de Servidor. Se o método de Solicitação de Servidor for POST, os valores serão recebidos do form de entrada. Caso contrário, se o método de Solicitação de Servidor for GET e o array $_GET contiverem um elemento com a chave "wishID", os valores serão recuperados do banco de dados pela função get_wish_by_wish_id. Finalmente, se o método de Solicitação do Servidor não for POST nem GET, o que significa que o caso de uso Adicionar Novo Desejo acontece, os elementos ficam vazios.
+O código inicializa o array  `$wish`  com três elementos:  `id` ,  `description`  e  `due_date` . Os valores desses elementos dependem do método de Solicitação de Servidor. Se o método de Solicitação de Servidor for POST, os valores serão recebidos do form de entrada. Caso contrário, se o método de Solicitação de Servidor for GET e o array $_GET contiverem um elemento com a chave "wishID", os valores serão recuperados do banco de dados pela função get_wish_by_wish_id. Finalmente, se o método de Solicitação do Servidor não for POST nem GET, o que significa que o caso de uso Adicionar Novo Desejo acontece, os elementos ficam vazios.
 
 O código precedente cobre os casos de criação e edição de desejos. Agora você precisa atualizar o form de entrada para que ele possa ser usado por ambos os casos.
 
 
 === Atualizando o Form de Entrada HTML
 
-Atualmente, o form de entrada funciona quando você quer criar um novo desejo e não há id de desejo. Para que o form funcione ao editar um desejo existente, é necessário adicionar um campo oculto para transferir o ID de um desejo. O valor do campo oculto deve ser recuperado no array $wish. O valor deve ser uma string vazia durante a criação de um novo desejo. Se o desejo for editado, o valor do campo oculto deve ser alterado para o wisher ID. Para criar esse campo oculto, adicione a linha seguinte à parte superior do form de entrada  ``EditWish``  em  ``editWish.php`` :
+Atualmente, o form de entrada funciona quando você quer criar um novo desejo e não há id de desejo. Para que o form funcione ao editar um desejo existente, é necessário adicionar um campo oculto para transferir o ID de um desejo. O valor do campo oculto deve ser recuperado no array $wish. O valor deve ser uma string vazia durante a criação de um novo desejo. Se o desejo for editado, o valor do campo oculto deve ser alterado para o wisher ID. Para criar esse campo oculto, adicione a linha seguinte à parte superior do form de entrada  `EditWish`  em  `editWish.php` :
 
 [source,php]
 ----
 
-<input type="hidden" name="wishID" value="<?php echo  ``$wish`` ["id"];?>" />
+<input type="hidden" name="wishID" value="<?php echo  `$wish` ["id"];?>" />
 ----
 
 
@@ -301,27 +311,34 @@
 
 *Para atualizar o editWish.php para que ele verifique se um desejo é novo e atualizá-lo caso não seja novo:*
 
-1. Adicione a função  ``update_wish``  ao  ``db.php`` .
+1. Adicione a função  `update_wish`  ao  `db.php` .
 
 *Para o banco de dados MySQL:*
 
 
-[source,java]
-----
-
-public function update_wish($wishID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($duedate==''){$this->query("UPDATE wishes SET description = '" . $description . "',due_date = NULL WHERE id = " . $wishID);} else$this->query("UPDATE wishes SET description = '" . $description ."', due_date = " . $this->format_date_for_sql($duedate). " WHERE id = " . $wishID);}  
-----
-
-*Para o banco de dados Oracle:*
-
-
-[source,java]
+[source,php]
 ----
 
 public function update_wish($wishID, $description, $duedate) {
-    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 
-              'YYYY-MM-DD')  WHERE id = :wish_id_bv";
+    $description = $this->real_escape_string($description);
+    if ($duedate==''){
+        $this->query("UPDATE wishes SET description = '" . $description . "',
+            due_date = NULL WHERE id = " . $wishID);
+    } else
+        $this->query("UPDATE wishes SET description = '" . $description .
+            "', due_date = " . $this->format_date_for_sql($duedate)
+            . " WHERE id = " . $wishID);
+}
+----
+*Para o banco de dados Oracle:*
+
+
+[source,php]
+----
+
+public function update_wish($wishID, $description, $duedate) {
+    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 'YYYY-MM-DD') 
+                WHERE id = :wish_id_bv";
     $stid = oci_parse($this->con, $query);
     oci_bind_by_name($stid, ':wish_id_bv', $wishID);
     oci_bind_by_name($stid, ':desc_bv', $description);
@@ -331,21 +348,23 @@
 }
 ----
 2. 
-Adicione a função  ``get_wish_by_wish_id``  ao  ``db.php`` .
+Adicione a função  `get_wish_by_wish_id`  ao  `db.php` .
 
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wish_by_wish_id ($wishID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);}
+public function get_wish_by_wish_id ($wishID) {
+    return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);
+}
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wish_by_wish_id($wishID) {
@@ -356,37 +375,53 @@
     return $stid;
 }
 ----
-3. Na parte principal, no bloco PHP superior do  ``editWish.php`` , adicione uma condição para a instrução`else` final. Esta é a instrução  ``else``  que insere o desejo no banco de dados. Trocar para instrução  ``else if`` :
+3. Na parte principal, no bloco PHP superior do  `editWish.php` , adicione uma condição para a instrução`else` final. Esta é a instrução  `else`  que insere o desejo no banco de dados. Trocar para instrução  `else if` :
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]=="") {WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;}
+else if ($_POST["wishID"]=="") {
+    WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
+}
 ----
-4. Digite ou cole outra instrução  ``else if``  abaixo daquela que você acabou de editar:
+4. Digite ou cole outra instrução  `else if`  abaixo daquela que você acabou de editar:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]!="") {WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;
+else if ($_POST["wishID"]!="") {
+    WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
 } 
 ----
 
-O código verifica se o elemento  ``wishID``  no array  ``$_POST``  não é uma string vazia, o que significa que o usuário foi redirecionado da página  ``editWishList.php`` , pressionando o botão Editar, e se o usuário preencheu a descrição do desejo. Se a verificação for bem-sucedida, o código chamará a função  ``update_wish``  com os parâmetros de entrada  ``wishid`` ,  ``description`` e  ``duedate. `` Esses parâmetros são recebidos do form de entrada HTML usando o método post. Depois que o  ``update_wish``  for chamado, a aplicação será redirecionada para a página  ``editWishList.php``  e o processamento de PHP será cancelado.
+O código verifica se o elemento  `wishID`  no array  `$_POST`  não é uma string vazia, o que significa que o usuário foi redirecionado da página  `editWishList.php` , pressionando o botão Editar, e se o usuário preencheu a descrição do desejo. Se a verificação for bem-sucedida, o código chamará a função  `update_wish`  com os parâmetros de entrada  `wishid` ,  `description` e  `duedate. ` Esses parâmetros são recebidos do form de entrada HTML usando o método post. Depois que o  `update_wish`  for chamado, a aplicação será redirecionada para a página  `editWishList.php`  e o processamento de PHP será cancelado.
 
 
 == Testando a Funcionalidade Editar Desejo
 
 1. Execute a aplicação. Na página index.php, preencha os campos: no campo Nome do Usuário, digite "Tom", e no campo Senha, digite "tomcat".
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. Pressione o botão Editar Minha Lista de Desejos. A página  ``editWishList.php``  abre.
+
+2. Pressione o botão Editar Minha Lista de Desejos. A página  `editWishList.php`  abre.
+
 image::images/edit-wish-list-edit-wish.png[]
-3. Clique em Editar ao lado de Icecream. A página  ``editWish.php``  abre.
+
+3. Clique em Editar ao lado de Icecream. A página  `editWish.php`  abre.
+
 image::images/edit-wish.png[]
-4. Edite os campos e pressione Voltar à Lista. A página  ``editWishList.php``  abre, mas as alterações não são salvas.
+
+4. Edite os campos e pressione Voltar à Lista. A página  `editWishList.php`  abre, mas as alterações não são salvas.
 5. Pressione Editar ao lado de Icecream. Limpe o campo Descreva seu desejo e pressione Salvar Alterações. Uma mensagem de erro é exibida.
+
 image::images/editWishEmptyDescription.png[]
-6. Insira Chocolate Icecream no campo Descreva seu desejo e pressione Salvar Alterações. A página  ``editWishList.php``  abre com uma lista atualizada.
+
+6. Insira Chocolate Icecream no campo Descreva seu desejo e pressione Salvar Alterações. A página  `editWishList.php`  abre com uma lista atualizada.
+
 image::images/editWishListWishAdded.png[]
 
 
@@ -396,22 +431,24 @@
 
 *Para permitir que o usuário delete desejos:*
 
-1. Adicione uma função `` delete_wish``  ao  ``db.php`` .
+1. Adicione uma função ` delete_wish`  ao  `db.php` .
 
 *Para o banco de dados MySQL:*
 
 
-[source,java]
+[source,php]
 ----
 
-function delete_wish ($wishID){$this->query("DELETE FROM wishes WHERE id = " . $wishID);}
+function delete_wish ($wishID){
+    $this->query("DELETE FROM wishes WHERE id = " . $wishID);
+}
 
 ----
 
 *Para o banco de dados Oracle:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function delete_wish($wishID) {
@@ -421,32 +458,37 @@
     oci_execute($stid); 
 }
 ----
-2. Crie um novo arquivo PHP chamado  ``deleteWish.php``  e insira o seguinte código no <? php?>:
-
-[source,java]
-----
-
-require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  ``editWishList.php`` ' );
-----
-O código permite o uso do arquivo  ``db.php`` . Em seguida, ele chama a função  ``delete_wish``  a partir de uma instância do WishDB, com o  ``wishID``  como o parâmetro de entrada. Finalmente, a aplicação é redirecionada para a página  ``editWishList.php`` .
-3. Para implementar o botão Deletar, adicione outra célula da tabela ao loop  ``while``  no  ``editWishList.php`` , diretamente abaixo do código do bloco para o botão  ``editWish`` . O form de entrada HTML contém um campo oculto para  ``wishID``  e um botão de envio chamado Deletar. (O código para o banco de dados MySQL é mostrado, mas o código adicionado é o mesmo, no mesmo local, para o banco de dados Oracle).
+2. Crie um novo arquivo PHP chamado  `deleteWish.php`  e insira o seguinte código no <? php?>:
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+require_once("Includes/db.php");
+WishDB::getInstance()->delete_wish ($_POST["wishID"]);
+header('Location: editWishList.php' );
+----
+O código permite o uso do arquivo  `db.php` . Em seguida, ele chama a função  `delete_wish`  a partir de uma instância do WishDB, com o  `wishID`  como o parâmetro de entrada. Finalmente, a aplicação é redirecionada para a página  `editWishList.php` .
+3. Para implementar o botão Deletar, adicione outra célula da tabela ao loop  `while`  no  `editWishList.php` , diretamente abaixo do código do bloco para o botão  `editWish` . O form de entrada HTML contém um campo oculto para  `wishID`  e um botão de envio chamado Deletar. (O código para o banco de dados MySQL é mostrado, mas o código adicionado é o mesmo, no mesmo local, para o banco de dados Oracle).
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-    *<td>
+    <td>
         <form name="deleteWish" action="deleteWish.php" method="POST">
             <input type="hidden" name="wishID" value="<?php echo $wishID; ?>"/>
             <input type="submit" name="deleteWish" value="Delete"/>
         </form>
-    </td>*
+    </td>
     <?php
     echo "</tr>\n";
     endwhile;
@@ -455,7 +497,7 @@
 </table>
 ----
 
-A tabela inteira, incluindo o form com o botão Editar dentro do loop  ``while `` , agora tem a seguinte aparência:
+A tabela inteira, incluindo o form com o botão Editar dentro do loop  `while ` , agora tem a seguinte aparência:
 
 *Para o banco de dados MySQL:*
 
@@ -470,7 +512,7 @@
     $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
     while($row = mysqli_fetch_array($result)):
-        echo "<tr><td>" . htmlentities($row['description") . "</td>";
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
         echo "<td>" . htmlentities($row['due_date']) . "</td>";
         $wishID = $row["id"];
     ?>
@@ -534,7 +576,7 @@
 
 == Testando a Funcionalidade Deletar Desejo
 
-Para verificar se a funcionalidade foi implementada corretamente, pressione Deletar ao lado de qualquer item na página  ``editWishList.php`` . O item não está mais na lista.
+Para verificar se a funcionalidade foi implementada corretamente, pressione Deletar ao lado de qualquer item na página  `editWishList.php` . O item não está mais na lista.
 
 image::images/deleteWish.png[]
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ru.asciidoc
index b982787..fd2619c 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_ru.asciidoc
@@ -42,32 +42,10 @@
 :keywords: Apache NetBeans, Tutorials, Урок 7. Обновление и удаление записей в базе данных
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. 
-link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. link:wish-list-lesson6.html[+Добавление нового пожелания в базу данных+]
-8. 
-*=> Обновление и удаление записей в базе данных*
-
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В этом уроке функциональные возможности приложения будут расширены двумя компонентами:
 
 
-Для реализации этих функций следует изменить файлы  ``editWishList.php``  и  ``editWish.php`` . Кроме этого, следует создать новый файл с именем  ``deleteWish.php`` .
+Для реализации этих функций следует изменить файлы  `editWishList.php`  и  `editWish.php` . Кроме этого, следует создать новый файл с именем  `deleteWish.php` .
 
 image::images/page-flow-diagram-l7.png[]
 
@@ -86,45 +64,62 @@
 
 Функциональные возможности поддерживают следующий вариант использования:
 
-* На странице  ``editWishList.php``  пользователь нажимает кнопку "Edit" справа от пожелания. Откроется страница  ``editWish.php``  с данными выбранного пожелания.
+* На странице  `editWishList.php`  пользователь нажимает кнопку "Edit" справа от пожелания. Откроется страница  `editWish.php`  с данными выбранного пожелания.
 * Пользователь изменяет описание и/или срок выполнения пожелания, а затем нажимает кнопку "Save Changes".
-* Если описание _не_ заполнено, то выводится сообщение об ошибке, после чего выполняется возврат к странице  ``editWish.php`` .
-* Если описание заполнено, то выполняется возврат к странице  ``editWishList.php`` , на которой можно обновить данные пожелания.
+* Если описание _не_ заполнено, то выводится сообщение об ошибке, после чего выполняется возврат к странице  `editWish.php` .
+* Если описание заполнено, то выполняется возврат к странице  `editWishList.php` , на которой можно обновить данные пожелания.
 
 Реализация состоит из следующих действий:
 
-* <<addEditButton,Добавление кнопки "Edit" на страницу "editWishList">>
-* <<wishArrayUpdate,На странице editWish.php — обновление массива $wish для хранения данных пожеланий>>
-* <<updateInputForm,Обновление формы ввода на странице editWish.php>>
-* <<updateWishRecord,Проверка правильности переданных данных и обновление пожелания в базе данных>>
+* <<_implementing_the_edit_button,Добавление кнопки "Edit" на страницу "editWishList">>
+* <<_expanding_the_code_wish_code_array,На странице editWish.php — обновление массива $wish для хранения данных пожеланий>>
+* <<_updating_the_html_input_form,Обновление формы ввода на странице editWish.php>>
+* <<_updating_the_wish_in_the_database,Проверка правильности переданных данных и обновление пожелания в базе данных>>
 
 
 === Реализация кнопки "Edit"
 
-Таблица  ``editWishList.php``  (таблица, включающая все пожелания, созданные пользователем) реализуется с помощью цикла (оператор  ``while`` ), который выводит на экран строки с пожеланиями, в то время как пожелания выбираются из базы данных. Добавьте кнопку "Edit" как крайнюю правую ячейку в ряду.
+Таблица  `editWishList.php`  (таблица, включающая все пожелания, созданные пользователем) реализуется с помощью цикла (оператор  `while` ), который выводит на экран строки с пожеланиями, в то время как пожелания выбираются из базы данных. Добавьте кнопку "Edit" как крайнюю правую ячейку в ряду.
 
-1. Для обеспечения передачи идентификатора пожелания посредством формы ввода HTML он должен быть сохранен в виде переменной. Введите следующую строку кода в конце цикла  ``while `` :
+1. Для обеспечения передачи идентификатора пожелания посредством формы ввода HTML он должен быть сохранен в виде переменной. Введите следующую строку кода в конце цикла  `while ` :
 
-[source,java]
+[source,php]
 ----
-
-while ($row = ...) {echo ...echo ...*$wishID = $row["id"];*}
-?>
+while ($row = mysqli_fetch_array($result)):
+    echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+    echo "<td>" . htmlentities($row['due_date']) . "</td>";
+    $wishID = $row['id'];
+    echo "<td>WishID=" . $wishID . "</td>";
+    //The loop is left open
+    ?>
 ----
-2. Создайте кнопку правки. С помощью формы editWish добавьте еще одну ячейку таблицы перед закрывающим тегом </table>. Эта форма содержит компонент кнопки и скрытый компонент, который при нажатии кнопки отправляет значение  ``$wishID`` . (Показан код для базы данных MySQL, но добавлен тот же код и в то же место, что и для базы данных Oracle.)
+2. Создайте кнопку правки. С помощью формы editWish добавьте еще одну ячейку таблицы перед закрывающим тегом </table>. Эта форма содержит компонент кнопки и скрытый компонент, который при нажатии кнопки отправляет значение  `$wishID` . (Показан код для базы данных MySQL, но добавлен тот же код и в то же место, что и для базы данных Oracle.)
 
 [source,php]
 ----
 
-   Hello <?php echo $_SESSION["user"]; ?><br/><table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while ($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";}mysqli_free_result($result);?>
-            *<td>
-                <form name="editWish" action="editWish.php" method="GET">
-                    <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-                    <input type="submit" name="editWish" value="Edit">
-                    </form>
-            </td>*</table>
+Hello <?php echo $_SESSION["user"]; ?><br/>
+<table border="black">
+    <tr><th>Item</th><th>Due Date</th></tr>
+    <?php
+    require_once("Includes/db.php");
+    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
+    <td>
+        <form name="editWish" action="editWish.php" method="GET">
+            <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+            <input type="submit" name="editWish" value="Edit">
+        </form>
+    </td>
+</table>
 ----
-3. Измените цикл  ``while`` , чтобы использовать link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+альтернативный синтаксис+]. Это облегчает выполнение блоков HTML внутри цикла  ``while`` . В альтернативном синтаксисе цикла  ``while``  открывающая фигурная скобка "{" заменяется двоеточием ":", а завершающая фигурная скобка "}" заменяется оператором  ``endwhile;`` . Замените открывающую фигурную скобку двоеточием, удалите закрывающую фигурную скобку и перед закрывающим тегом </table> добавьте новый блок PHP с оператором  ``endwhile;`` . Это приводит к добавлению новой ячейки таблицы в цикле  ``while`` . Переместите код оператора free result/free на место после оператора  ``endwhile;`` . (И вновь приведен код для MySQL, но изменение кода и его местоположение точно такие же, как для базы данных Oracle.)
+3. Измените цикл  `while` , чтобы использовать link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+альтернативный синтаксис+]. Это облегчает выполнение блоков HTML внутри цикла  `while` . В альтернативном синтаксисе цикла  `while`  открывающая фигурная скобка "{" заменяется двоеточием ":", а завершающая фигурная скобка "}" заменяется оператором  `endwhile;` . Замените открывающую фигурную скобку двоеточием, удалите закрывающую фигурную скобку и перед закрывающим тегом </table> добавьте новый блок PHP с оператором  `endwhile;` . Это приводит к добавлению новой ячейки таблицы в цикле  `while` . Переместите код оператора free result/free на место после оператора  `endwhile;` . (И вновь приведен код для MySQL, но изменение кода и его местоположение точно такие же, как для базы данных Oracle.)
 
 [source,php]
 ----
@@ -132,7 +127,7 @@
     while ($row = mysqli_fetch_array($result))[.line-through]#{#*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";[.line-through]#    }mysqli_free_result($result);#?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo  `$wish` ID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
@@ -143,28 +138,31 @@
 </table>
 ----
 4. 
-Исправьте синтаксис для строки таблицы. Переместите закрывающие строку символы </tr>\n из оператора echo для срока выполнения в новый оператор echo непосредственно над оператором  ``endwhile;`` .
+Исправьте синтаксис для строки таблицы. Переместите закрывающие строку символы </tr>\n из оператора echo для срока выполнения в новый оператор echo непосредственно над оператором  `endwhile;` .
 
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
     <?php
-    *echo "</tr>\n";*
+    echo "</tr>\n";
     endwhile;
     mysqli_free_result($result);
     ?>
 </table>
 ----
 5. 
-Код для таблицы, включая форму с кнопкой "Edit" (Изменить), в цикле  ``while ``  выглядит следующим образом.
+Код для таблицы, включая форму с кнопкой "Edit" (Изменить), в цикле  `while `  выглядит следующим образом.
 
 *Для базы данных MySQL*
 
@@ -234,14 +232,13 @@
 </table>
 ----
 
+=== Расширение массива  `$wish` 
 
-=== Расширение массива  ``$wish`` 
+После нажатия кнопки "Edit" на странице  `editWishList.php`  идентификатор выбранного пожелания передается на страницу  `editWish.php`  с использованием метода запроса к серверу "GET". Для сохранения идентификатора пожелания следует добавить новый элемент к массиву  `$wish` .
 
-После нажатия кнопки "Edit" на странице  ``editWishList.php``  идентификатор выбранного пожелания передается на страницу  ``editWish.php``  с использованием метода запроса к серверу "GET". Для сохранения идентификатора пожелания следует добавить новый элемент к массиву  ``$wish`` .
+Так же, как и при добавлении нового пожелания, в случае неудачной попытки сохранения можно перейти в форму ввода может как со страницы  `editWishList.php` , так и со страницы  `editWish.php` . Отличие между вариантами заключается в методе запроса к серверу, посредством которого осуществляется передача данных. Метод "GET" указывает, что форма отображается при первом переходе пользователя на эту страницу при нажатии на кнопку "Edit Wish". Метод POST указывает на то, что пользователь был перенаправлен в форму после попытки сохранения пожелания без описания.
 
-Так же, как и при добавлении нового пожелания, в случае неудачной попытки сохранения можно перейти в форму ввода может как со страницы  ``editWishList.php`` , так и со страницы  ``editWish.php`` . Отличие между вариантами заключается в методе запроса к серверу, посредством которого осуществляется передача данных. Метод "GET" указывает, что форма отображается при первом переходе пользователя на эту страницу при нажатии на кнопку "Edit Wish". Метод POST указывает на то, что пользователь был перенаправлен в форму после попытки сохранения пожелания без описания.
-
-В файле  ``editWish.php``  замените блок PHP в HTML <body> выше формы ввода  ``EditWish``  на расширенный код для массива  ``$wish`` .
+В файле  `editWish.php`  замените блок PHP в HTML <body> выше формы ввода  `EditWish`  на расширенный код для массива  `$wish` .
 
 *Для базы данных MySQL*
 
@@ -249,10 +246,16 @@
 [source,php]
 ----
 
-<?phpif ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("id" => $_POST["wishID"], "description" => 
-        $_POST["wish"], "due_date" => $_POST["dueDate"]);else if (array_key_exists("wishID", $_GET))$wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));else$wish = array("id" => "", "description" => "", "due_date" => "");?>
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "POST")
+    $wish = array("id" => $_POST["wishID"], "description" => 
+            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+else if (array_key_exists("wishID", $_GET))
+    $wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));
+else
+    $wish = array("id" => "", "description" => "", "due_date" => "");
+?>
 ----
-
 *Для базы данных Oracle*
 
 
@@ -262,7 +265,7 @@
 <?php
 if ($_SERVER["REQUEST_METHOD"] == "POST")
     $wish = array("id" => $_POST["wishID"], "description" =>
-            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+                $_POST["wish"], "due_date" => $_POST["dueDate"]);
 else if (array_key_exists("wishID", $_GET)) {
     $stid = WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]);
     $row = oci_fetch_array($stid, OCI_ASSOC);
@@ -270,23 +273,23 @@
                 $row["DESCRIPTION"], "due_date" => $row["DUE_DATE"]);
     oci_free_statement($stid);
 } else
-$wish = array("id" => "", "description" => "", "due_date" => "");
+    $wish = array("id" => "", "description" => "", "due_date" => "");
 ?>
 ----
 
-Код инициализирует массив  ``$wish``  с тремя элементами –  ``id`` ,  ``description``  и  ``due_date`` . Значения этих элементов зависят от метода запроса к серверу. Если используется метод запроса к серверу "POST", то значения извлекаются из формы ввода. В противном случае, если используется метод запроса к серверу "GET", и при этом массив "$_GET" содержит элемент с ключом "wishID", значения извлекаются из базы данных функцией "get_wish_by_wish_id". Наконец, если не используется ни один из методов запроса ("POST" или "GET"), то это означает вариант добавления нового пожелания, т.е. что элементы пусты.
+Код инициализирует массив  `$wish`  с тремя элементами –  `id` ,  `description`  и  `due_date` . Значения этих элементов зависят от метода запроса к серверу. Если используется метод запроса к серверу "POST", то значения извлекаются из формы ввода. В противном случае, если используется метод запроса к серверу "GET", и при этом массив "$_GET" содержит элемент с ключом "wishID", значения извлекаются из базы данных функцией "get_wish_by_wish_id". Наконец, если не используется ни один из методов запроса ("POST" или "GET"), то это означает вариант добавления нового пожелания, т.е. что элементы пусты.
 
 Указанный код включает все варианты создания и редактирования желаний. Теперь следует обновить код формы ввода таким образом, чтобы она подходила для обоих вариантов.
 
 
 === Обновление формы ввода HTML
 
-Пока форма ввода работает в том случае, когда требуется создать новое пожелание и отсутствует идентификатор пожелания. Чтобы форма работала в том случае, когда требуется редактировать существующее пожелание, необходимо добавить скрытое поле для передачи идентификатора пожелания. Значение этого скрытого поля должно извлекаться из массива $wish. На этапе создания нового пожелания значению должна соответствовать пустая строка. При редактировании пожелания значение скрытого поля должно измениться на идентификатор пожелания. Для создания скрытого поля добавьте следующую строку вверху формы ввода  ``EditWish``  в файле  ``editWish.php`` .
+Пока форма ввода работает в том случае, когда требуется создать новое пожелание и отсутствует идентификатор пожелания. Чтобы форма работала в том случае, когда требуется редактировать существующее пожелание, необходимо добавить скрытое поле для передачи идентификатора пожелания. Значение этого скрытого поля должно извлекаться из массива $wish. На этапе создания нового пожелания значению должна соответствовать пустая строка. При редактировании пожелания значение скрытого поля должно измениться на идентификатор пожелания. Для создания скрытого поля добавьте следующую строку вверху формы ввода  `EditWish`  в файле  `editWish.php` .
 
 [source,php]
 ----
 
-<input type="hidden" name="wishID" value="<?php echo  ``$wish`` ["id"];?>" />
+<input type="hidden" name="wishID" value="<?php echo  `$wish` ["id"];?>" />
 ----
 
 
@@ -301,27 +304,34 @@
 
 *Для обновления файла editWish.php для выполнения проверки того, является ли пожелание новым или требуется его обновить, необходимо выполнить следующее:*
 
-1. Добавьте функцию  ``update_wish``  к  ``db.php`` .
+1. Добавьте функцию  `update_wish`  к  `db.php` .
 
 *Для базы данных MySQL*
 
 
-[source,java]
-----
-
-public function update_wish($wishID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($duedate==''){$this->query("UPDATE wishes SET description = '" . $description . "',due_date = NULL WHERE id = " . $wishID);} else$this->query("UPDATE wishes SET description = '" . $description ."', due_date = " . $this->format_date_for_sql($duedate). " WHERE id = " . $wishID);}  
-----
-
-*Для базы данных Oracle*
-
-
-[source,java]
+[source,php]
 ----
 
 public function update_wish($wishID, $description, $duedate) {
-    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 
-              'YYYY-MM-DD')  WHERE id = :wish_id_bv";
+    $description = $this->real_escape_string($description);
+    if ($duedate==''){
+        $this->query("UPDATE wishes SET description = '" . $description . "',
+            due_date = NULL WHERE id = " . $wishID);
+    } else
+        $this->query("UPDATE wishes SET description = '" . $description .
+            "', due_date = " . $this->format_date_for_sql($duedate)
+            . " WHERE id = " . $wishID);
+}
+----
+*Для базы данных Oracle*
+
+
+[source,php]
+----
+
+public function update_wish($wishID, $description, $duedate) {
+    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 'YYYY-MM-DD') 
+                WHERE id = :wish_id_bv";
     $stid = oci_parse($this->con, $query);
     oci_bind_by_name($stid, ':wish_id_bv', $wishID);
     oci_bind_by_name($stid, ':desc_bv', $description);
@@ -331,21 +341,22 @@
 }
 ----
 2. 
-Добавьте функцию  ``get_wish_by_wish_id``  к  ``db.php`` .
+Добавьте функцию  `get_wish_by_wish_id`  к  `db.php` .
 
 *Для базы данных MySQL*
 
-
-[source,java]
+[source,php]
 ----
 
-public function get_wish_by_wish_id ($wishID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);}
+public function get_wish_by_wish_id ($wishID) {
+    return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);
+}
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wish_by_wish_id($wishID) {
@@ -356,37 +367,53 @@
     return $stid;
 }
 ----
-3. В главный метод, в верхний блок PHP файла  ``editWish.php`` , добавьте условие к последнему оператору `else`. Именно этот оператор  ``else``  вставляет пожелание в базу данных. Замените его на оператор  ``else if`` :
+3. В главный метод, в верхний блок PHP файла  `editWish.php` , добавьте условие к последнему оператору `else`. Именно этот оператор  `else`  вставляет пожелание в базу данных. Замените его на оператор  `else if` :
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]=="") {WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;}
+else if ($_POST["wishID"]=="") {
+    WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
+}
 ----
-4. Введите или вставьте другой оператор  ``else if``  после только что отредактированного:
+4. Введите или вставьте другой оператор  `else if`  после только что отредактированного:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]!="") {WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;
+else if ($_POST["wishID"]!="") {
+    WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
 } 
 ----
 
-Код выполняет проверку того, что элемент  ``wishID``  в массиве  ``$_POST``  не является пустой строкой (что означает перенаправление со страницы  ``editWishList.php``  путем нажатия кнопки "Edit"), а также что пользователь указал описание пожелания. Если проверка выполнена успешно, код вызывает функцию  ``update_wish``  с входными параметрами  ``wishID`` ,  ``description``  и  ``dueDate`` .Эти параметры получены от формы ввода HTML с помощью метода POST. После вызова  ``update_wish``  осуществляется переход на страницу  ``editWishList.php`` , и обработка блока PHP прерывается.
+Код выполняет проверку того, что элемент  `wishID`  в массиве  `$_POST`  не является пустой строкой (что означает перенаправление со страницы  `editWishList.php`  путем нажатия кнопки "Edit"), а также что пользователь указал описание пожелания. Если проверка выполнена успешно, код вызывает функцию  `update_wish`  с входными параметрами  `wishID` ,  `description`  и  `dueDate` .Эти параметры получены от формы ввода HTML с помощью метода POST. После вызова  `update_wish`  осуществляется переход на страницу  `editWishList.php` , и обработка блока PHP прерывается.
 
 
 == Тестирование функциональной возможности редактирования пожелания
 
 1. Запустите приложение. На странице "index.php" заполните следующие поля: в поле "Username" введите "Tom", в поле "Password" введите "tomcat".
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. Нажмите кнопку "Edit My Wish List". Откроется страница  ``editWishList.php`` .
+
+2. Нажмите кнопку "Edit My Wish List". Откроется страница  `editWishList.php` .
+
 image::images/edit-wish-list-edit-wish.png[]
-3. Нажмите кнопку "Edit" рядом с пожеланием "Icecream". Откроется страница  ``editWish.php`` .
+
+3. Нажмите кнопку "Edit" рядом с пожеланием "Icecream". Откроется страница  `editWish.php` .
+
 image::images/edit-wish.png[]
-4. Отредактируйте поля и нажмите кнопку "Back to the List". Откроется страница  ``editWishList.php`` , однако изменения не сохранены.
+
+4. Отредактируйте поля и нажмите кнопку "Back to the List". Откроется страница  `editWishList.php` , однако изменения не сохранены.
 5. Нажмите кнопку "Edit" рядом с "Icecream". Очистите поле "Describe your wish" и нажмите кнопку "Save Changes". Появится сообщение об ошибке.
+
 image::images/editWishEmptyDescription.png[]
-6. Введите "Chocolate icecream" в поле "Describe your wish" и нажмите "Save Changes". Откроется страница  ``editWishList.php``  с обновленным списком пожеланий.
+
+6. Введите "Chocolate icecream" в поле "Describe your wish" и нажмите "Save Changes". Откроется страница  `editWishList.php`  с обновленным списком пожеланий.
+
 image::images/editWishListWishAdded.png[]
 
 
@@ -396,22 +423,24 @@
 
 *Для предоставления пользователю возможности удаления пожелания необходимо выполнить следующее:*
 
-1. Добавьте функцию  `` delete_wish``  к  ``db.php`` .
+1. Добавьте функцию  ` delete_wish`  к  `db.php` .
 
 *Для базы данных MySQL*
 
 
-[source,java]
+[source,php]
 ----
 
-function delete_wish ($wishID){$this->query("DELETE FROM wishes WHERE id = " . $wishID);}
+function delete_wish ($wishID){
+    $this->query("DELETE FROM wishes WHERE id = " . $wishID);
+}
 
 ----
 
 *Для базы данных Oracle*
 
 
-[source,java]
+[source,php]
 ----
 
 public function delete_wish($wishID) {
@@ -421,32 +450,35 @@
     oci_execute($stid); 
 }
 ----
-2. Создайте новый файл PHP с именем  ``deleteWish.php``  и введите следующий код в блок <? php ? >:
+2. Создайте новый файл PHP с именем  `deleteWish.php`  и введите следующий код в блок <? php ? >:
 
 [source,java]
 ----
 
-require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  ``editWishList.php`` ' );
+require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  `editWishList.php` ' );
 ----
-Код обращается к файлу  ``db.php`` . Затем выполняется вызов функции  ``delete_wish``  из экземпляра WishDB со значением  ``wishID``  в качестве входного параметра. Наконец, выполняется перенаправление на страницу  ``editWishList.php`` .
-3. Для реализации кнопки "Delete" (Удалить) добавьте еще одну ячейку таблицы HTML к циклу  ``while``  в файле  ``editWishList.php`` , непосредственно ниже блока кода для кнопки  ``editWish`` . Форма ввода HTML содержит скрытое поле для  ``wishID``  и кнопу отправки данных с надписью "Delete". (Показан код для базы данных MySQL, но добавлен тот же код и в то же место, что и для базы данных Oracle.)
+Код обращается к файлу  `db.php` . Затем выполняется вызов функции  `delete_wish`  из экземпляра WishDB со значением  `wishID`  в качестве входного параметра. Наконец, выполняется перенаправление на страницу  `editWishList.php` .
+3. Для реализации кнопки "Delete" (Удалить) добавьте еще одну ячейку таблицы HTML к циклу  `while`  в файле  `editWishList.php` , непосредственно ниже блока кода для кнопки  `editWish` . Форма ввода HTML содержит скрытое поле для  `wishID`  и кнопу отправки данных с надписью "Delete". (Показан код для базы данных MySQL, но добавлен тот же код и в то же место, что и для базы данных Oracle.)
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-    *<td>
+    <td>
         <form name="deleteWish" action="deleteWish.php" method="POST">
             <input type="hidden" name="wishID" value="<?php echo $wishID; ?>"/>
             <input type="submit" name="deleteWish" value="Delete"/>
         </form>
-    </td>*
+    </td>
     <?php
     echo "</tr>\n";
     endwhile;
@@ -455,7 +487,7 @@
 </table>
 ----
 
-Код для таблицы, включая форму с кнопкой "Edit" (Изменить), в цикле  ``while ``  выглядит следующим образом.
+Код для таблицы, включая форму с кнопкой "Edit" (Изменить), в цикле  `while `  выглядит следующим образом.
 
 *Для базы данных MySQL*
 
@@ -470,7 +502,7 @@
     $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
     while($row = mysqli_fetch_array($result)):
-        echo "<tr><td>" . htmlentities($row['description") . "</td>";
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
         echo "<td>" . htmlentities($row['due_date']) . "</td>";
         $wishID = $row["id"];
     ?>
@@ -534,7 +566,7 @@
 
 == Тестирование функциональной возможности удаления пожелания
 
-Для проверки правильности реализации этой функциональной возможности нажмите "Delete" рядом с любым элементом на странице  ``editWishList.php`` . Элемент удаляется из списка.
+Для проверки правильности реализации этой функциональной возможности нажмите "Delete" рядом с любым элементом на странице  `editWishList.php` . Элемент удаляется из списка.
 
 image::images/deleteWish.png[]
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_zh_CN.asciidoc
index 59e7741..bc12603 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson7_zh_CN.asciidoc
@@ -42,32 +42,10 @@
 :keywords: Apache NetBeans, Tutorials, 第 7 课:更新和删除数据库中的条目
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. 
-link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. 
-*=> 更新和删除数据库中的条目*
-
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 在本课中,将使用以下两个功能扩展应用程序功能:
 
 
-要实现这些功能,请编辑  ``editWishList.php``  和  ``editWish.php``  文件。您还会创建一个名为  ``deleteWish.php``  的新文件。
+要实现这些功能,请编辑  `editWishList.php`  和  `editWish.php`  文件。您还会创建一个名为  `deleteWish.php`  的新文件。
 
 image::images/page-flow-diagram-l7.png[]
 
@@ -86,85 +64,110 @@
 
 该功能支持以下用例:
 
-* 在  ``editWishList.php``  页上,用户按愿望右侧的 "Edit" 按钮。包含选定愿望数据的  ``editWish.php``  页打开。
+* 在  `editWishList.php`  页上,用户按愿望右侧的 "Edit" 按钮。包含选定愿望数据的  `editWish.php`  页打开。
 * 用户更改愿望说明和/或截止日期,然后按 "Save Changes" 按钮。
-* 如果_未_填写说明,则会显示一条错误消息,且用户将返回到  ``editWish.php``  页。
-* 如果填写了说明,应用程序将返回到  ``editWishList.php``  页,将在其中更新愿望。
+* 如果_未_填写说明,则会显示一条错误消息,且用户将返回到  `editWish.php`  页。
+* 如果填写了说明,应用程序将返回到  `editWishList.php`  页,将在其中更新愿望。
 
 该实现包括以下步骤:
 
-* <<addEditButton,在 editWishList 页上添加 "Edit" 按钮>>
-* <<wishArrayUpdate,在 editWish.php 页上更新 $wish 数组以存储愿望数据>>
-* <<updateInputForm,在 editWish.php 页上更新输入窗体>>
-* <<updateWishRecord,验证提交的数据并更新数据库中的愿望>>
+* <<_implementing_the_edit_button,在 editWishList 页上添加 "Edit" 按钮>>
+* <<_expanding_the_code_wish_code_array,在 editWish.php 页上更新 $wish 数组以存储愿望数据>>
+* <<_updating_the_html_input_form,在 editWish.php 页上更新输入窗体>>
+* <<_updating_the_wish_in_the_database,验证提交的数据并更新数据库中的愿望>>
 
 
 === 实现 "Edit" 按钮
 
-在  ``editWishList.php``  中,通过一个循环( ``while``  语句)实现包含许愿者愿望的表;从数据库中选择愿望时,该循环将显示包含愿望的行。添加 "Edit" 按钮作为行中最右侧的单元格。
+在  `editWishList.php`  中,通过一个循环( `while`  语句)实现包含许愿者愿望的表;从数据库中选择愿望时,该循环将显示包含愿望的行。添加 "Edit" 按钮作为行中最右侧的单元格。
 
-1. 要通过 HTML 输入窗体传输愿望 ID,请将其存储在变量中。在  ``while `` 循环末尾,输入以下代码行:
+1. 要通过 HTML 输入窗体传输愿望 ID,请将其存储在变量中。在  `while ` 循环末尾,输入以下代码行:
 
-[source,java]
+[source,php]
 ----
-
-while ($row = ...) {echo ...echo ...*$wishID = $row["id"];*}
-?>
+while ($row = mysqli_fetch_array($result)):
+    echo "<tr><td>" . htmlentities($row['description']) . "</td>";
+    echo "<td>" . htmlentities($row['due_date']) . "</td>";
+    $wishID = $row['id'];
+    echo "<td>WishID=" . $wishID . "</td>";
+    //The loop is left open
+    ?>
 ----
-2. 实现 "Edit" 按钮。在结束 </table> 标记前面,使用 editWish 窗体添加另一个窗体元格。该窗体包含一个按钮组件和一个隐藏组件;在单击该按钮时,该隐藏组件将发送  ``$wishID``  值。(显示的是 MySQL 数据库代码,但为 Oracle 数据库添加的代码是相同的并位于相同的位置。)
+2. 实现 "Edit" 按钮。在结束 </table> 标记前面,使用 editWish 窗体添加另一个窗体元格。该窗体包含一个按钮组件和一个隐藏组件;在单击该按钮时,该隐藏组件将发送  `$wishID`  值。(显示的是 MySQL 数据库代码,但为 Oracle 数据库添加的代码是相同的并位于相同的位置。)
 
 [source,php]
 ----
 
-   Hello <?php echo $_SESSION["user"]; ?><br/><table border="black"><tr><th>Item</th><th>Due Date</th></tr><?phprequire_once("Includes/db.php");$wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);$result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);while ($row = mysqli_fetch_array($result)) {echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";}mysqli_free_result($result);?>
-            *<td>
-                <form name="editWish" action="editWish.php" method="GET">
-                    <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-                    <input type="submit" name="editWish" value="Edit">
-                    </form>
-            </td>*</table>
-----
-3. 更改  ``while``  循环以使用link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+替代语法+]。这可简化在  ``while``  循环中执行 HTML 块的过程。在替代  ``while``  循环语法中,左花括号 { 将替换为冒号 (:),右花括号 } 将替换为  ``endwhile;``  语句。将左花括号替换为冒号,删除右花括号,然后在结束 </table> 标记前面使用  ``endwhile;``  语句添加一个新 PHP 块。这会将新表单元格包含在  ``while``  循环中。将释放结果/释放语句代码移到  ``endwhile;``  语句后面。(同样,显示的是 MySQL 数据库代码,但 Oracle 数据库的代码更改和位置是相同的。)
-
-[source,php]
-----
-
-    while ($row = mysqli_fetch_array($result))[.line-through]#{#*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";[.line-through]#    }mysqli_free_result($result);#?>
+Hello <?php echo $_SESSION["user"]; ?><br/>
+<table border="black">
+    <tr><th>Item</th><th>Due Date</th></tr>
+    <?php
+    require_once("Includes/db.php");
+    $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
+    $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
+    while ($row = mysqli_fetch_array($result)) {
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
-           <input type="submit" name="editWish" value="Edit">
+            <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-*    <?php
-    endwhile;
-    mysqli_free_result($result);
-    ?>*
 </table>
 ----
-4. 
-修复表行语法。将行结束 </tr>\n 字符从截止日期回显语句移到新回显语句(紧靠  ``endwhile;``  上面)。
-
+3. 更改  `while`  循环以使用link:http://www.php.net/manual/en/control-structures.alternative-syntax.php[+替代语法+]。这可简化在  `while`  循环中执行 HTML 块的过程。在替代  `while`  循环语法中,左花括号 { 将替换为冒号 (:),右花括号 } 将替换为  `endwhile;`  语句。将左花括号替换为冒号,删除右花括号,然后在结束 </table> 标记前面使用  `endwhile;`  语句添加一个新 PHP 块。这会将新表单元格包含在  `while`  循环中。将释放结果/释放语句代码移到  `endwhile;`  语句后面。(同样,显示的是 MySQL 数据库代码,但 Oracle 数据库的代码更改和位置是相同的。)
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+   while ($row = mysqli_fetch_array($result)){:
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    }
+    mysqli_free_result($result);
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
     <?php
-    *echo "</tr>\n";*
+    endwhile;
+    mysqli_free_result($result);
+    ?>
+</table>
+----
+4. 
+修复表行语法。将行结束 </tr>\n 字符从截止日期回显语句移到新回显语句(紧靠  `endwhile;`  上面)。
+
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
+    <td>
+        <form name="editWish" action="editWish.php" method="GET">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
+           <input type="submit" name="editWish" value="Edit">
+        </form>
+    </td>
+    <?php
+    echo "</tr>\n";
     endwhile;
     mysqli_free_result($result);
     ?>
 </table>
 ----
 5. 
-整个表(包括将 "Edit" 按钮放在  ``while``  循环内的窗体)现在显示如下:
+整个表(包括将 "Edit" 按钮放在  `while`  循环内的窗体)现在显示如下:
 
 *对于 MySQL 数据库:*
 
@@ -235,13 +238,13 @@
 ----
 
 
-=== 扩充  ``$wish``  数组
+=== 扩充  `$wish`  数组
 
-在  ``editWishList.php``  页上按 "Edit" 按钮时,选定愿望的 ID 将通过服务器请求方法 GET 传输到  ``editWish.php``  页。要存储愿望 ID,您需要在  ``$wish``  数组中添加新元素。
+在  `editWishList.php`  页上按 "Edit" 按钮时,选定愿望的 ID 将通过服务器请求方法 GET 传输到  `editWish.php`  页。要存储愿望 ID,您需要在  `$wish`  数组中添加新元素。
 
-与添加新愿望一样,保存尝试失败后可以从  ``editWishList.php``  页和  ``editWish.php``  页访问输入窗体。因此,可通过传输数据时使用的服务器请求方法来区分这两种情况。GET 表示在用户第一次通过按 "Edit Wish" 访问页面时显示窗体。POST 表示在尝试保存没有说明的愿望后将用户重定向到窗体。
+与添加新愿望一样,保存尝试失败后可以从  `editWishList.php`  页和  `editWish.php`  页访问输入窗体。因此,可通过传输数据时使用的服务器请求方法来区分这两种情况。GET 表示在用户第一次通过按 "Edit Wish" 访问页面时显示窗体。POST 表示在尝试保存没有说明的愿望后将用户重定向到窗体。
 
-在  ``editWish.php``  中,将  ``EditWish``  输入窗体上面 HTML <body> 中的 PHP 块替换为扩展的  ``$wish``  数组代码。
+在  `editWish.php`  中,将  `EditWish`  输入窗体上面 HTML <body> 中的 PHP 块替换为扩展的  `$wish`  数组代码。
 
 *对于 MySQL 数据库:*
 
@@ -249,8 +252,15 @@
 [source,php]
 ----
 
-<?phpif ($_SERVER["REQUEST_METHOD"] == "POST")$wish = array("id" => $_POST["wishID"], "description" => 
-        $_POST["wish"], "due_date" => $_POST["dueDate"]);else if (array_key_exists("wishID", $_GET))$wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));else$wish = array("id" => "", "description" => "", "due_date" => "");?>
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "POST")
+    $wish = array("id" => $_POST["wishID"], "description" => 
+            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+else if (array_key_exists("wishID", $_GET))
+    $wish = mysqli_fetch_array(WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]));
+else
+    $wish = array("id" => "", "description" => "", "due_date" => "");
+?>
 ----
 
 *对于 Oracle 数据库:*
@@ -262,7 +272,7 @@
 <?php
 if ($_SERVER["REQUEST_METHOD"] == "POST")
     $wish = array("id" => $_POST["wishID"], "description" =>
-            $_POST["wish"], "due_date" => $_POST["dueDate"]);
+                $_POST["wish"], "due_date" => $_POST["dueDate"]);
 else if (array_key_exists("wishID", $_GET)) {
     $stid = WishDB::getInstance()->get_wish_by_wish_id($_GET["wishID"]);
     $row = oci_fetch_array($stid, OCI_ASSOC);
@@ -270,23 +280,23 @@
                 $row["DESCRIPTION"], "due_date" => $row["DUE_DATE"]);
     oci_free_statement($stid);
 } else
-$wish = array("id" => "", "description" => "", "due_date" => "");
+    $wish = array("id" => "", "description" => "", "due_date" => "");
 ?>
 ----
 
-该代码使用以下三个元素初始化  ``$wish``  数组: ``id`` 、 ``description``  和  ``due_date`` 。这些元素的值取决于服务器请求方法。如果服务器请求方法是 POST,则从输入窗体中接收这些值。否则,如果服务器请求方法是 GET,并且 $_GET 数组包含具有 "wishID" 键的元素,则通过 get_wish_by_wish_id 函数从数据库中检索这些值。最后,如果服务器请求方法既不是 "POST" 也不是 "GET"(表示是“添加新的愿望”用例),则这些元素为空。
+该代码使用以下三个元素初始化  `$wish`  数组: `id` 、 `description`  和  `due_date` 。这些元素的值取决于服务器请求方法。如果服务器请求方法是 POST,则从输入窗体中接收这些值。否则,如果服务器请求方法是 GET,并且 $_GET 数组包含具有 "wishID" 键的元素,则通过 get_wish_by_wish_id 函数从数据库中检索这些值。最后,如果服务器请求方法既不是 "POST" 也不是 "GET"(表示是“添加新的愿望”用例),则这些元素为空。
 
 前面的代码涉及创建和编辑愿望的用例。现在,您需要更新输入窗体,以便将其用于这两种情况。
 
 
 === 更新 HTML 输入窗体
 
-目前,输入窗体适用于以下情况:您要创建新的愿望,并且没有愿望 ID。要使窗体适用于编辑现有愿望的情况,您需要添加一个隐藏字段以传输愿望 ID。必须从 $wish 数组中检索隐藏字段的值。在创建新的愿望期间,该值必须是一个空字符串。如果编辑了愿望,则必须将隐藏字段的值更改为愿望 ID。要创建该隐藏字段,请在  ``editWish.php``  中的  ``EditWish``  输入窗体上面添加以下行:
+目前,输入窗体适用于以下情况:您要创建新的愿望,并且没有愿望 ID。要使窗体适用于编辑现有愿望的情况,您需要添加一个隐藏字段以传输愿望 ID。必须从 $wish 数组中检索隐藏字段的值。在创建新的愿望期间,该值必须是一个空字符串。如果编辑了愿望,则必须将隐藏字段的值更改为愿望 ID。要创建该隐藏字段,请在  `editWish.php`  中的  `EditWish`  输入窗体上面添加以下行:
 
 [source,php]
 ----
 
-<input type="hidden" name="wishID" value="<?php echo  ``$wish`` ["id"];?>" />
+<input type="hidden" name="wishID" value="<?php echo  `$wish` ["id"];?>" />
 ----
 
 
@@ -301,27 +311,35 @@
 
 *更新 editWish.php 以验证愿望是否为新愿望并在愿望不是新愿望时进行更新:*
 
-1. 将  ``update_wish``  函数添加到  ``db.php``  中。
+1. 将  `update_wish`  函数添加到  `db.php`  中。
 
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function update_wish($wishID, $description, $duedate){
-    $description = $this->real_escape_string($description);if ($duedate==''){$this->query("UPDATE wishes SET description = '" . $description . "',due_date = NULL WHERE id = " . $wishID);} else$this->query("UPDATE wishes SET description = '" . $description ."', due_date = " . $this->format_date_for_sql($duedate). " WHERE id = " . $wishID);}  
+public function update_wish($wishID, $description, $duedate) {
+    $description = $this->real_escape_string($description);
+    if ($duedate==''){
+        $this->query("UPDATE wishes SET description = '" . $description . "',
+            due_date = NULL WHERE id = " . $wishID);
+    } else
+        $this->query("UPDATE wishes SET description = '" . $description .
+            "', due_date = " . $this->format_date_for_sql($duedate)
+            . " WHERE id = " . $wishID);
+}
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function update_wish($wishID, $description, $duedate) {
-    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 
-              'YYYY-MM-DD')  WHERE id = :wish_id_bv";
+    $query = "UPDATE wishes SET description = :desc_bv, due_date = to_date(:due_date_bv, 'YYYY-MM-DD') 
+                WHERE id = :wish_id_bv";
     $stid = oci_parse($this->con, $query);
     oci_bind_by_name($stid, ':wish_id_bv', $wishID);
     oci_bind_by_name($stid, ':desc_bv', $description);
@@ -331,21 +349,23 @@
 }
 ----
 2. 
-将  ``get_wish_by_wish_id``  函数添加到  ``db.php``  中。
+将  `get_wish_by_wish_id`  函数添加到  `db.php`  中。
 
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-public function get_wish_by_wish_id ($wishID) {return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);}
+public function get_wish_by_wish_id ($wishID) {
+    return $this->query("SELECT id, description, due_date FROM wishes WHERE id = " . $wishID);
+}
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function get_wish_by_wish_id($wishID) {
@@ -356,37 +376,53 @@
     return $stid;
 }
 ----
-3. 在  ``editWish.php``  顶部的主 PHP 块中,在最终的 `else` 语句中添加一个条件。这是将愿望插入到数据库的  ``else``  语句。将其更改为  ``else if``  语句:
+3. 在  `editWish.php`  顶部的主 PHP 块中,在最终的 `else` 语句中添加一个条件。这是将愿望插入到数据库的  `else`  语句。将其更改为  `else if`  语句:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]=="") {WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;}
+else if ($_POST["wishID"]=="") {
+    WishDB::getInstance()->insert_wish($wisherID, $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
+}
 ----
-4. 在刚编辑的语句下面,键入或粘贴另一个  ``else if``  语句:
+4. 在刚编辑的语句下面,键入或粘贴另一个  `else if`  语句:
 
-[source,java]
+[source,php]
 ----
 
-else if ($_POST["wishID"]!="") {WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);header('Location:  ``editWishList.php`` ' );exit;
+else if ($_POST["wishID"]!="") {
+    WishDB::getInstance()->update_wish($_POST["wishID"], $_POST["wish"], $_POST["dueDate"]);
+    header('Location: editWishList.php' );
+    exit;
 } 
 ----
 
-该代码检查  ``$_POST``  数组中的  ``wishID``  元素是否为空字符串,这意味着通过按 "Edit" 按钮从  ``editWishList.php``  页重定向了用户,并且用户填写了愿望说明。如果检查成功,则该代码将使用输入参数  ``wishID`` 、 ``description``  和  ``dueDate``  调用函数  ``update_wish`` 。通过 POST 方法从 HTML 输入窗体接收这些参数。在调用  ``update_wish``  后,应用程序将重定向到  ``editWishList.php``  页并取消 PHP 处理。
+该代码检查  `$_POST`  数组中的  `wishID`  元素是否为空字符串,这意味着通过按 "Edit" 按钮从  `editWishList.php`  页重定向了用户,并且用户填写了愿望说明。如果检查成功,则该代码将使用输入参数  `wishID` 、 `description`  和  `dueDate`  调用函数  `update_wish` 。通过 POST 方法从 HTML 输入窗体接收这些参数。在调用  `update_wish`  后,应用程序将重定向到  `editWishList.php`  页并取消 PHP 处理。
 
 
 == 测试编辑愿望功能
 
 1. 运行应用程序。在 index.php 页上,填写以下字段:在 "Username" 字段中输入 "Tom",在 "Password" 字段中输入 "tomcat"。
+
 image::images/user-logon-to-edit-wish-list.png[]
-2. 按 "Edit My Wish List" 按钮。 ``editWishList.php``  页打开。
+
+2. 按 "Edit My Wish List" 按钮。 `editWishList.php`  页打开。
+
 image::images/edit-wish-list-edit-wish.png[]
-3. 单击 Icecream 旁边的 "Edit"。 ``editWish.php``  页打开。
+
+3. 单击 Icecream 旁边的 "Edit"。 `editWish.php`  页打开。
+
 image::images/edit-wish.png[]
-4. 编辑这些字段,然后按 "Back to the List"。 ``editWishList.php``  页打开,但未保存更改。
+
+4. 编辑这些字段,然后按 "Back to the List"。 `editWishList.php`  页打开,但未保存更改。
 5. 按 Icecream 旁边的 "Edit"。清除 "Describe your wish" 字段,然后按 "Save Changes"。将显示一条错误消息。
+
 image::images/editWishEmptyDescription.png[]
-6. 在 "Describe your wish" 字段中输入 Chocolate icecream,然后按 "Save Changes"。 ``editWishList.php``  页打开,并更新列表。
+
+6. 在 "Describe your wish" 字段中输入 Chocolate icecream,然后按 "Save Changes"。 `editWishList.php`  页打开,并更新列表。
+
 image::images/editWishListWishAdded.png[]
 
 
@@ -396,22 +432,24 @@
 
 *允许用户删除愿望:*
 
-1. 将  ``delete_wish``  函数添加到  ``db.php``  中。
+1. 将  `delete_wish`  函数添加到  `db.php`  中。
 
 *对于 MySQL 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
-function delete_wish ($wishID){$this->query("DELETE FROM wishes WHERE id = " . $wishID);}
+function delete_wish ($wishID){
+    $this->query("DELETE FROM wishes WHERE id = " . $wishID);
+}
 
 ----
 
 *对于 Oracle 数据库:*
 
 
-[source,java]
+[source,php]
 ----
 
 public function delete_wish($wishID) {
@@ -421,32 +459,37 @@
     oci_execute($stid); 
 }
 ----
-2. 创建一个名为  ``deleteWish.php``  的新 PHP 文件,然后在 <? php ?> 块下键入或粘贴以下代码:
-
-[source,java]
-----
-
-require_once("Includes/db.php");WishDB::getInstance()->delete_wish ($_POST["wishID"]);header('Location:  ``editWishList.php`` ' );
-----
-该代码允许使用  ``db.php``  文件。然后,它会从 WishDB 实例中调用  ``delete_wish``  函数,并将  ``wishID``  作为输入参数。最后,应用程序将重定向到  ``editWishList.php``  页。
-3. 要实现 "Delete" 按钮,请在  ``editWishList.php``  的  ``while``  循环中添加另一个 HTML 表单元格,紧靠  ``editWish``  按钮的代码块下面。HTML 输入窗体包含  ``wishID``  隐藏字段以及一个标记为 "Delete" 的提交按钮。(显示的是 MySQL 数据库代码,但为 Oracle 数据库添加的代码是相同的并位于相同的位置。)
+2. 创建一个名为  `deleteWish.php`  的新 PHP 文件,然后在 <? php ?> 块下键入或粘贴以下代码:
 
 [source,php]
 ----
 
-    while ($row = mysqli_fetch_array($result))*:*echo "<tr><td>" . htmlentities($row["description"]) . "</td>";echo "<td>" . htmlentities($row["due_date"]) . "</td>[.line-through]#</tr>\n#";?>
+require_once("Includes/db.php");
+WishDB::getInstance()->delete_wish ($_POST["wishID"]);
+header('Location: editWishList.php' );
+----
+该代码允许使用  `db.php`  文件。然后,它会从 WishDB 实例中调用  `delete_wish`  函数,并将  `wishID`  作为输入参数。最后,应用程序将重定向到  `editWishList.php`  页。
+3. 要实现 "Delete" 按钮,请在  `editWishList.php`  的  `while`  循环中添加另一个 HTML 表单元格,紧靠  `editWish`  按钮的代码块下面。HTML 输入窗体包含  `wishID`  隐藏字段以及一个标记为 "Delete" 的提交按钮。(显示的是 MySQL 数据库代码,但为 Oracle 数据库添加的代码是相同的并位于相同的位置。)
+
+[source,php]
+----
+
+    while ($row = mysqli_fetch_array($result)):
+        echo "<tr><td>" . htmlentities($row["description"]) . "</td>";
+        echo "<td>" . htmlentities($row["due_date"]) . "</td></tr>\n";
+    ?>
     <td>
         <form name="editWish" action="editWish.php" method="GET">
-           <input type="hidden" name="wishID" value="<?php echo  ``$wish`` ID; ?>">
+           <input type="hidden" name="wishID" value="<?php echo $wishID; ?>">
            <input type="submit" name="editWish" value="Edit">
         </form>
     </td>
-    *<td>
+    <td>
         <form name="deleteWish" action="deleteWish.php" method="POST">
             <input type="hidden" name="wishID" value="<?php echo $wishID; ?>"/>
             <input type="submit" name="deleteWish" value="Delete"/>
         </form>
-    </td>*
+    </td>
     <?php
     echo "</tr>\n";
     endwhile;
@@ -455,7 +498,7 @@
 </table>
 ----
 
-整个表(包括将 "Edit" 按钮放在  ``while``  循环内的窗体)现在显示如下:
+整个表(包括将 "Edit" 按钮放在  `while`  循环内的窗体)现在显示如下:
 
 *对于 MySQL 数据库:*
 
@@ -470,7 +513,7 @@
     $wisherID = WishDB::getInstance()->get_wisher_id_by_name($_SESSION["user"]);
     $result = WishDB::getInstance()->get_wishes_by_wisher_id($wisherID);
     while($row = mysqli_fetch_array($result)):
-        echo "<tr><td>" . htmlentities($row['description") . "</td>";
+        echo "<tr><td>" . htmlentities($row['description']) . "</td>";
         echo "<td>" . htmlentities($row['due_date']) . "</td>";
         $wishID = $row["id"];
     ?>
@@ -534,7 +577,7 @@
 
 == 测试删除愿望功能
 
-要检查是否正确实现了该功能,请在  ``editWishList.php``  页上按任何项目旁边的 "Delete"。该项目将不再出现在列表中。
+要检查是否正确实现了该功能,请在  `editWishList.php`  页上按任何项目旁边的 "Delete"。该项目将不再出现在列表中。
 
 image::images/deleteWish.png[]
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8.asciidoc
index d4f7e74..e1a9b22 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8.asciidoc
@@ -41,62 +41,29 @@
 :keywords: Apache NetBeans, Tutorials, Lesson 8: Making the Application Look Better Using the CSS Technology
 
 
-Tutorial contents:
-
-1. link:wish-list-tutorial-main-page.html[+Creating a Database Driven Application With PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. link:wish-list-oracle-lesson1.html[+Creating Oracle Database Tables+]
-3. 
-link:wish-list-lesson2.html[+Designing the Application. Reading from the Database+]
-
-4. link:wish-list-lesson3.html[+Creating a New Application User +]
-5. link:wish-list-lesson4.html[+Optimizing the Code+]
-6. link:wish-list-lesson5.html[+Adding Security. Implementing Application User Logon+]
-7. link:wish-list-lesson6.html[+ Adding a New Wish to the Database+]
-8. link:wish-list-lesson7.html[+Updating and Deleting Entries in the Database+]
-9. 
-*=>Making the Application Look Better Using the CSS Technology*
-
-* <<previousLessonSourceCode,Application Source Code from the Previous Lesson>>
-* <<hideLogonForm,Hiding Forms>>
-* <<javaScriptFunctions,JavaScript Functions>>
-* <<showHideLogonInIndex,Updating index.php>>
-* <<designStyles,Defining Styles Using the Cascading Style Sheet>>
-* <<creatingCSSFile,Creating a CSS File>>
-* <<defineCSSStyles,Defining CSS Styles>>
-* <<divs,Implementing the Design Using HTML Divs>>
-* <<lessonResultSourceCode,Application Source Code after the Current Lesson Is Completed>>
-* <<nextSteps,Next Steps>>
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
-
 In this lesson you learn how to do the following:
 
-* <<hideLogonForm,Hide input forms when they are not used by implementing JavaScript functions >>
-* <<designStyles,Define the styles and positioning of page elements by applying Cascading Style Sheet>>
-* <<divs,Implement the application design using divs>>.
+* <<_hiding_forms,Hide input forms when they are not used by implementing JavaScript functions >>
+* <<_defining_styles_using_the_cascading_style_sheet,Define the styles and positioning of page elements by applying Cascading Style Sheet>>
+* <<_implementing_the_design_using_html_divs,Implement the application design using divs>>.
 
 The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
 
 
-
 == Application Source Code from the Previous Lesson
 
 MySQL users: Click link:https://netbeans.org/files/documents/4/1933/lesson7.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson7.zip[+ here+] to download the source code that reflects the project state after the previous lesson is completed.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson7.zip[+here+] to download the source code that reflects the project state after the previous lesson is completed.
 
 
 == Hiding Forms
 
-Presently, the main  ``index.php``  page of your application always displays the entire logon and showWishList forms. To improve the appearance of your application, you can hide the forms and replace them with buttons. When the user presses a button the corresponding hidden form expands.
+Presently, the main  `index.php`  page of your application always displays the entire logon and showWishList forms. To improve the appearance of your application, you can hide the forms and replace them with buttons. When the user presses a button the corresponding hidden form expands.
 
 To implement this behavior:
 
-1. Add a <script></script> block to the  ``index.php``  file right above the closing </body> tag.
+1. Add a <script></script> block to the  `index.php`  file right above the closing </body> tag.
 2. <<javaScriptFunctions,Develop two JavaScript functions inside the <script></script> tags>>.
 3. <<showHideLogonInIndex,Make some minor changes to the index.php file>>
 
@@ -134,44 +101,46 @@
 ----
 
 
-=== Updating  ``index.php`` 
+=== Updating `index.php` 
 
-1. Add a  ``style``  attribute to the logon form:
+1. Add a  `style`  attribute to the logon form:
 
 [source,php]
 ----
 
 <form name="logon" action="index.php" method="POST" 
-        *style="visibility:<?php if ($logonSuccess) echo "hidden";
-        else echo "visible";?>"*>
+        style="visibility:<?php if ($logonSuccess) echo "hidden";
+        else echo "visible";?>">
 ----
-The  ``style``  attribute defines whether the form is hidden or visible. The <?php ?> block is used to keep the form visible until the user logs on successfully.
+The  `style`  attribute defines whether the form is hidden or visible. The <?php ?> block is used to keep the form visible until the user logs on successfully.
 2. Enter the following code above the logon input form code:
 
-[source,java]
+[source,php]
 ----
 
- <input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
 The code implements a button with the text "My Wishlist >>". The button stands in place of the logon form. Pressing the button calls the showHideLogonForm function.
-3. Add a  ``style``  attribute to the wishList form:
+3. Add a  `style`  attribute to the wishList form:
 
 [source,xml]
 ----
 
-<form name="wishList" action="wishlist.php" method="GET" *style="visibility:hidden"*>
-Show wish list of: <input type="text" name="user"/><input type="submit" value="Go" /></form>
+<form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+Show wish list of: <input type="text" name="user"/>
+            <input type="submit" value="Go" />
+</form>
 ----
 4. Enter the following code above the wishList form:
 
-[source,java]
+[source,xml]
 ----
 
-<input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+<input type="submit" name="showWishList" value="Show Wish List of" onclick="javascript:showHideShowWishListForm()"/>
 ----
 5. Remove the following code from the form because it is already placed on the button:
 
-[source,java]
+[source,php]
 ----
 
 Show wishlist of: 
@@ -189,48 +158,70 @@
 
 1. Click the right mouse button on the Source Files node and from the context menu choose New > Cascading Style Sheet.
 2. On the Cascading Style Sheet panel, in the File Name edit box enter wishlist. Click Finish. 
+
 image::images/newCascadingStyleSheetFile.png[]
-The new file  ``wishlist.css``  is shown in the project tree.
+
+The new file  `wishlist.css`  is shown in the project tree.
 
 
 === Defining CSS Styles
 
-Open the wishlist.css file. The file already contains a "root" class, which you can remove. You can get a copy of  ``wishlist.css``  by downloading a completed version of this tutorial, available link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+here+]. The code is intuitively clear and contains:
+Open the wishlist.css file. The file already contains a "root" class, which you can remove. You can get a copy of  `wishlist.css`  by downloading a completed version of this tutorial, available link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+here+]. The code is intuitively clear and contains:
 
-* Two styles: "body" and "input" - that are automatically applied inside any  ``<body></body>``  or  ``<input/>``  tag.
-* CSS classes that are applied when explicitly specified. The names of classes have dots in preposition, for example, ``.createWishList`` . Some classes are used several times, for example, the ".error" class is applied to all error messages in the application. Other classes are used only once, for example, ".showWishList", ".logon".
+* Two styles: "body" and "input" - that are automatically applied inside any  `<body></body>`  or  `<input/>`  tag.
+* CSS classes that are applied when explicitly specified. The names of classes have dots in preposition, for example, `.createWishList` . Some classes are used several times, for example, the ".error" class is applied to all error messages in the application. Other classes are used only once, for example, ".showWishList", ".logon".
 
 
 == Implementing the Design Using HTML Divs
 
 All the recommendations and suggestions concerning the application design are optional. Like the style definitions above they are intended just to give you an example of how to improve the application's appearance.
 
-The example below shows how you can improve the appearance of the  ``index.php``  page.
+The example below shows how you can improve the appearance of the  `index.php`  page.
 
-1. To enable using the CSS classes that you defined, enter the following code inside the  ``<head></head>``  block:
-
-[source,java]
-----
-
-     <link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
-----
-The styles "body" and "input" are automatically applied inside the corresponding tags so you do need to indicate them explicitly.
-2. To apply any other style (class) to an area, enclose the code that implements the area in the  ``<div class=""></div>``  tags:
+1. To enable using the CSS classes that you defined, enter the following code inside the  `<head></head>`  block:
 
 [source,html]
 ----
 
- <div class="showWishList"><input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/><form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden"><input type="text" name="user"/><input type="submit" value="Go" /></form></div>
+<link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
+----
+The styles "body" and "input" are automatically applied inside the corresponding tags so you do need to indicate them explicitly.
+2. To apply any other style (class) to an area, enclose the code that implements the area in the  `<div class=""></div>`  tags:
+
+[source,html]
+----
+
+<div class="showWishList">
+    <input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+    
+    <form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+       <input type="text" name="user"/>
+       <input type="submit" value="Go" />
+    </form>
+</div>
 ----
 
 NOTE: When a class is specified within a <div> tag, no dot is required in preposition.
 
 3. You can use embedded <div> tags:
 
-[source,php]
+[source,html]
 ----
 
-<div class="logon"><input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/><form name="logon" action="index.php" method="POST" style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">Username: <input type="text" name="user"/>Password:  <input type="password" name="userpassword"/><br/><div class="error"><?phpif (!$logonSuccess) echo "Invalid name and/or password";?></div><input type="submit" value="Edit My Wish List"/></form></div>  
+<div class="logon">
+    <input type="submit" name="myWishList" value="My Wishlist" onclick="javascript:showHideLogonForm()"/>
+    <form name="logon" action="index.php" method="POST" 
+              style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">
+        Username: <input type="text" name="user"/>
+        Password:  <input type="password" name="userpassword"/><br/>
+        <div class="error">
+          <?php
+             if (!$logonSuccess) echo "Invalid name and/or password";
+           ?>
+        </div>
+        <input type="submit" value="Edit My Wish List"/>
+    </form>
+</div>  
 ----
 The class "logon" is applied to the entire form, and the class "error" is applied to an error message within the form.
 
@@ -239,9 +230,9 @@
 
 == Application Source Code after the Current Lesson Is Completed
 
-MySQL users: Click link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+ here+] to download the source code that includes a sample design and CSS file.
+MySQL users: Click link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+here+] to download the source code that includes a sample design and CSS file.
 
-Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson8.zip[+ here+] to download the source code that includes a sample design and CSS file.
+Oracle Database users: Click link:https://netbeans.org/projects/www/downloads/download/php%252Foracle-lesson8.zip[+here+] to download the source code that includes a sample design and CSS file.
 
 PDO: Goran Miskovic, a community member, has kindly provided a PDO version of the complete tutorial, available link:https://netbeans.org/projects/www/downloads/download/php/wishlist-pdo.zip[+here+]. In this project, you can switch between Oracle XE and MySQL databases simply by changing the DSN parameter. The project includes all SQL scripts you need and is documented in the code. Note however that PDO_OCI is experimental.
 
@@ -254,5 +245,4 @@
 
 link:wish-list-lesson9.html[+Next lesson >>+]
 
-link:wish-list-tutorial-main-page.html[+Back to the Tutorial main page+]
-
+link:wish-list-tutorial-main-page.html[+Back to the Tutorial main page+]
\ No newline at end of file
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ja.asciidoc
index d960ae4..e503603 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ja.asciidoc
@@ -42,28 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, レッスン8: CSSテクノロジを使用したアプリケーションの外観の改良
 
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. 
-link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. 
-*=>CSSテクノロジを使用したアプリケーションの外観の改良*
-
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 このレッスンでは、次のことを行う方法を学習します。
 
 
@@ -80,11 +58,11 @@
 
 == フォームの非表示
 
-現時点で、アプリケーションのメインの ``index.php`` ページには、常にログオンおよびshowWishListフォームの全体が表示されます。アプリケーションの外観を改良するために、フォームを非表示にしてボタンに置き換えることができます。ユーザーがボタンを押すと、対応する非表示フォームが拡張されます。
+現時点で、アプリケーションのメインの `index.php` ページには、常にログオンおよびshowWishListフォームの全体が表示されます。アプリケーションの外観を改良するために、フォームを非表示にしてボタンに置き換えることができます。ユーザーがボタンを押すと、対応する非表示フォームが拡張されます。
 
 この動作を実装するには:
 
-1.  ``index.php`` ファイルの終了</body>タグの直前に、<script></script>ブロックを追加します。
+1.  `index.php` ファイルの終了</body>タグの直前に、<script></script>ブロックを追加します。
 2. <<javaScriptFunctions,<script></script>タグ内に2つのJavaScript関数を開発します>>。
 3. <<showHideLogonInIndex,index.phpファイルに小さな変更をいくつか行います。>>
 
@@ -118,48 +96,50 @@
         document.all.showWishList.value = "<< Show Wish List of";
     }
 }
-</script>	
+</script>   
 ----
 
 
-===  ``index.php`` の更新
+===  `index.php` の更新
 
-1. ログオン・フォームに、次の ``style`` 属性を追加します。
+1. ログオン・フォームに、次の `style` 属性を追加します。
 
 [source,php]
 ----
 
 <form name="logon" action="index.php" method="POST" 
-        *style="visibility:<?php if ($logonSuccess) echo "hidden";
-        else echo "visible";?>"*>
+        style="visibility:<?php if ($logonSuccess) echo "hidden";
+        else echo "visible";?>">
 ----
- ``style`` 属性は、フォームが非表示か可視かを定義します。<?php?>ブロックは、ユーザーが正常にログオンするまでフォームを可視のままにするために使用されます。
+ `style` 属性は、フォームが非表示か可視かを定義します。<?php?>ブロックは、ユーザーが正常にログオンするまでフォームを可視のままにするために使用されます。
 2. ログオン入力フォーム・コードの上に、次のコードを入力します。
 
-[source,java]
+[source,php]
 ----
 
- <input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
 このコードは、「My Wishlist >>」というテキストを持つボタンを実装します。ログオン・フォームのかわりにボタンが表示されます。ボタンを押すと、showHideLogonForm関数がコールされます。
-3. wishListフォームに ``style`` 属性を追加します。
+3. wishListフォームに `style` 属性を追加します。
 
 [source,xml]
 ----
 
-<form name="wishList" action="wishlist.php" method="GET" *style="visibility:hidden"*>
-Show wish list of: <input type="text" name="user"/><input type="submit" value="Go" /></form>
+<form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+Show wish list of: <input type="text" name="user"/>
+            <input type="submit" value="Go" />
+</form>
 ----
 4. wishListフォームの上に、次のコードを入力します。
 
-[source,java]
+[source,xml]
 ----
 
-<input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+<input type="submit" name="showWishList" value="Show Wish List of" onclick="javascript:showHideShowWishListForm()"/>
 ----
 5. 次のコードはすでにボタンにあるので、フォームから除去します。
 
-[source,java]
+[source,php]
 ----
 
 Show wishlist of: 
@@ -177,48 +157,70 @@
 
 1. 「ソース・ファイル」ノードでマウスの右ボタンをクリックし、コンテキスト・メニューから「新規」>「Cascading Style Sheet」を選択します。
 2. 「Cascading Style Sheet」パネルで、「ファイル名」編集ボックスに「wishlist」と入力します。「終了」をクリックします。
+
 image::images/newCascadingStyleSheetFile.png[]
-新しいファイル ``wishlist.css`` がプロジェクト・ツリーに表示されます。
+
+新しいファイル `wishlist.css` がプロジェクト・ツリーに表示されます。
 
 
 === CSSスタイルの定義
 
-wishlist.cssファイルを開きます。ファイルには、除去可能な「root」クラスがすでに含まれています。link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+ここ+]から入手できるこのチュートリアルの完成したバージョンをダウンロードすることによって、 ``wishlist.css`` のコピーを取得できます。コードは直観的にわかりやすく、また、次のものが含まれています。
+wishlist.cssファイルを開きます。ファイルには、除去可能な「root」クラスがすでに含まれています。link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+ここ+]から入手できるこのチュートリアルの完成したバージョンをダウンロードすることによって、 `wishlist.css` のコピーを取得できます。コードは直観的にわかりやすく、また、次のものが含まれています。
 
-* 2つのスタイル: 「body」および「input」 - 任意の ``<body></body>`` または ``<input/>`` タグの内部に自動的に適用されます。
-* 明示的に指定されたときに適用される、CSSクラス。クラス名は、 ``.createWishList`` のように、前にドットがあります。一部のクラスは複数回使用され、たとえば、「.error」クラスはアプリケーションのすべてのエラー・メッセージに適用されます。「.showWishList」、「.logon」など、その他のクラスは1度のみ使用されます。
+* 2つのスタイル: 「body」および「input」 - 任意の `<body></body>` または `<input/>` タグの内部に自動的に適用されます。
+* 明示的に指定されたときに適用される、CSSクラス。クラス名は、 `.createWishList` のように、前にドットがあります。一部のクラスは複数回使用され、たとえば、「.error」クラスはアプリケーションのすべてのエラー・メッセージに適用されます。「.showWishList」、「.logon」など、その他のクラスは1度のみ使用されます。
 
 
 == HTMLのdivを使用したデザインの実装
 
 アプリケーションのデザインに関する推奨および提案は、すべてオプションです。前述のスタイルの定義と同じように、アプリケーションの外観を改良する方法の例を示しています。
 
-次の例で、 ``index.php`` ページの外観を改良する方法を示します。
+次の例で、 `index.php` ページの外観を改良する方法を示します。
 
-1. 定義したCSSクラスを使用できるようにするには、次のコードを ``<head></head>`` ブロック内に入力します。
-
-[source,java]
-----
-
-     <link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
-----
-スタイル「body」と「input」は対応するタグ内に自動的に適用されるため、明示的に指定する必要はありません。
-2. 別のスタイル(クラス)を領域に適用するには、領域を実装するコードを ``<div class=""></div>`` タグで囲みます。
+1. 定義したCSSクラスを使用できるようにするには、次のコードを `<head></head>` ブロック内に入力します。
 
 [source,html]
 ----
 
- <div class="showWishList"><input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/><form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden"><input type="text" name="user"/><input type="submit" value="Go" /></form></div>
+<link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
+----
+スタイル「body」と「input」は対応するタグ内に自動的に適用されるため、明示的に指定する必要はありません。
+2. 別のスタイル(クラス)を領域に適用するには、領域を実装するコードを `<div class=""></div>` タグで囲みます。
+
+[source,html]
+----
+
+<div class="showWishList">
+    <input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+    
+    <form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+       <input type="text" name="user"/>
+       <input type="submit" value="Go" />
+    </form>
+</div>
 ----
 
 *注意:* クラスが<div>タグの内部で指定されている場合、前にドットを置く必要はありません。
 
 3. 次の埋込み<div>タグを使用できます。
 
-[source,php]
+[source,html]
 ----
 
-<div class="logon"><input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/><form name="logon" action="index.php" method="POST" style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">Username: <input type="text" name="user"/>Password:  <input type="password" name="userpassword"/><br/><div class="error"><?phpif (!$logonSuccess) echo "Invalid name and/or password";?></div><input type="submit" value="Edit My Wish List"/></form></div>  
+<div class="logon">
+    <input type="submit" name="myWishList" value="My Wishlist" onclick="javascript:showHideLogonForm()"/>
+    <form name="logon" action="index.php" method="POST" 
+              style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">
+        Username: <input type="text" name="user"/>
+        Password:  <input type="password" name="userpassword"/><br/>
+        <div class="error">
+          <?php
+             if (!$logonSuccess) echo "Invalid name and/or password";
+           ?>
+        </div>
+        <input type="submit" value="Edit My Wish List"/>
+    </form>
+</div>  
 ----
 クラス「logon」がフォーム全体に適用され、クラス「error」がフォーム内のエラー・メッセージに適用されます。
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_pt_BR.asciidoc
index 5453a72..aa45d9e 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_pt_BR.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, Lição 8: Melhorando a Aparência da Aplicação Usando a Tecnologia CSS
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. 
-link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário de Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. 
-*=> Melhorando a Aparência da Aplicação Usando a Tecnologia CSS*
-
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
 image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
 
 Nesta lição, você aprenderá a fazer o seguinte:
@@ -80,11 +60,11 @@
 
 == Ocultando Forms
 
-Atualmente, a página principal  ``index.php``  da aplicação sempre exibe o log-in completo e forms showWishList. Para aprimorar a aparência da aplicação, você pode ocultar os forms e substitui-los por botões. Quando o usuário pressionar um botão, o form oculto correspondente expandirá.
+Atualmente, a página principal  `index.php`  da aplicação sempre exibe o log-in completo e forms showWishList. Para aprimorar a aparência da aplicação, você pode ocultar os forms e substitui-los por botões. Quando o usuário pressionar um botão, o form oculto correspondente expandirá.
 
 Para implementar esse comportamento:
 
-1. Adicione um bloco <script></script> ao arquivo  ``index.php``  logo acima da tag </body> de encerramento.
+1. Adicione um bloco <script></script> ao arquivo  `index.php`  logo acima da tag </body> de encerramento.
 2. <<javaScriptFunctions,Desenvolva duas funções JavaScript dentro das tags <script></script>>>.
 3. <<showHideLogonInIndex,Faça algumas pequenas alterações no arquivo index.php>>
 
@@ -118,48 +98,50 @@
         document.all.showWishList.value = "<< Show Wish List of";
     }
 }
-</script>	
+</script>   
 ----
 
 
-=== Atualizando o  ``index.php`` 
+=== Atualizando o  `index.php` 
 
-1. Adicione um atributo  ``style``  ao form de log-in:
+1. Adicione um atributo  `style`  ao form de log-in:
 
 [source,php]
 ----
 
 <form name="logon" action="index.php" method="POST" 
-        *style="visibility:<?php if ($logonSuccess) echo "hidden";
-        else echo "visible";?>"*>
+        style="visibility:<?php if ($logonSuccess) echo "hidden";
+        else echo "visible";?>">
 ----
-O atributo  ``style``  define se o form está oculto ou visível. O bloco <?php ?> é usado para manter o form visível até que o usuário efetue log-in com êxito.
+O atributo  `style`  define se o form está oculto ou visível. O bloco <?php ?> é usado para manter o form visível até que o usuário efetue log-in com êxito.
 2. Digite o seguinte código acima do código do form de entrada de log-in:
 
-[source,java]
+[source,php]
 ----
 
- <input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
 O código implementa um botão com o texto "My Wishlist >>". O botão fica no lugar do form de log-in. Se você pressionar o botão, a função showHideLog-inForm será chamada.
-3. Adicione um atributo  ``style``  ao form wishList:
+3. Adicione um atributo  `style`  ao form wishList:
 
 [source,xml]
 ----
 
-<form name="wishList" action="wishlist.php" method="GET" *style="visibility:hidden"*>
-Show wish list of: <input type="text" name="user"/><input type="submit" value="Go" /></form>
+<form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+Show wish list of: <input type="text" name="user"/>
+            <input type="submit" value="Go" />
+</form>
 ----
 4. Digite o seguinte código acima do form WishList:
 
-[source,java]
+[source,xml]
 ----
 
-<input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+<input type="submit" name="showWishList" value="Show Wish List of" onclick="javascript:showHideShowWishListForm()"/>
 ----
 5. Remova o seguinte código do form porque ele já foi colocado no botão:
 
-[source,java]
+[source,php]
 ----
 
 Show wishlist of: 
@@ -177,48 +159,70 @@
 
 1. Clique com o botão direito do mouse no nó dos Arquivos de Código-Fonte e, no menu de contexto, selecione Novo > Folha de Estilos em Cascata.
 2. No painel Folha de Estilo em Cascata, na caixa de edição Nome do Arquivo, digite wishlist. Clique em Finalizar. 
+
 image::images/newCascadingStyleSheetFile.png[]
-O novo arquivo  ``wishlist.css``  é mostrado na árvore do projeto.
+
+O novo arquivo  `wishlist.css`  é mostrado na árvore do projeto.
 
 
 === Definindo Estilos CSS
 
-Abra o arquivo wishlist.css. O arquivo já contém uma classe "root", que pode ser removida. Você pode obter uma cópia do  ``wishlist.css``  fazendo download da versão completa deste tutorial, disponível link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+aqui+]. O código é intuitivamente claro e contém:
+Abra o arquivo wishlist.css. O arquivo já contém uma classe "root", que pode ser removida. Você pode obter uma cópia do  `wishlist.css`  fazendo download da versão completa deste tutorial, disponível link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+aqui+]. O código é intuitivamente claro e contém:
 
-* Dois estilos: "body" e "input" - que são aplicados automaticamente dentro de qualquer tag  ``<body></body>``  ou  ``<input/>`` .
-* Classes CSS que são aplicadas quando especificadas explicitamente. Os nomes das classes têm pontos na frente, por exemplo, ``.createWishList`` . Algumas classes são usadas várias vezes, por exemplo, a classe ".error" é aplicada a todas as mensagens de erro na aplicação. Outras classes são usadas apenas uma vez, por exemplo, ".showWishList", ".logon".
+* Dois estilos: "body" e "input" - que são aplicados automaticamente dentro de qualquer tag  `<body></body>`  ou  `<input/>` .
+* Classes CSS que são aplicadas quando especificadas explicitamente. Os nomes das classes têm pontos na frente, por exemplo, `.createWishList` . Algumas classes são usadas várias vezes, por exemplo, a classe ".error" é aplicada a todas as mensagens de erro na aplicação. Outras classes são usadas apenas uma vez, por exemplo, ".showWishList", ".logon".
 
 
 == Implementando o Design Usando Divs de HTML
 
 Todas as recomendações e sugestões a respeito do design da aplicação são opcionais. Como as definições de estilo acima, elas têm o objetivo apenas de dar um exemplo de como aprimorar a aparência da aplicação.
 
-O exemplo abaixo mostra como você pode aprimorar a aparência da página  ``index.php`` .
+O exemplo abaixo mostra como você pode aprimorar a aparência da página  `index.php` .
 
-1. Para ativar o uso de classes CSS que você definiu, digite o seguinte código no bloco  ``<head></head>`` :
-
-[source,java]
-----
-
-     <link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
-----
-Os estilos "body" e "input" são aplicados automaticamente dentro das tags correspondentes, assim, você precisa indicá-los explicitamente.
-2. Para aplicar outro estilo (classe) em uma área, circunde o código que implementa a área com as tags  ``<div class=""></div>`` :
+1. Para ativar o uso de classes CSS que você definiu, digite o seguinte código no bloco  `<head></head>` :
 
 [source,html]
 ----
 
- <div class="showWishList"><input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/><form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden"><input type="text" name="user"/><input type="submit" value="Go" /></form></div>
+<link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
+----
+Os estilos "body" e "input" são aplicados automaticamente dentro das tags correspondentes, assim, você precisa indicá-los explicitamente.
+2. Para aplicar outro estilo (classe) em uma área, circunde o código que implementa a área com as tags  `<div class=""></div>` :
+
+[source,html]
+----
+
+<div class="showWishList">
+    <input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+    
+    <form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+       <input type="text" name="user"/>
+       <input type="submit" value="Go" />
+    </form>
+</div>
 ----
 
 *Observação:*quando uma classe é especificada dentro de uma tag <div> , não é necessário um ponto na frente.
 
 3. Você pode usar tags <div> incorporadas:
 
-[source,php]
+[source,html]
 ----
 
-<div class="logon"><input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/><form name="logon" action="index.php" method="POST" style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">Username: <input type="text" name="user"/>Password:  <input type="password" name="userpassword"/><br/><div class="error"><?phpif (!$logonSuccess) echo "Invalid name and/or password";?></div><input type="submit" value="Edit My Wish List"/></form></div>  
+<div class="logon">
+    <input type="submit" name="myWishList" value="My Wishlist" onclick="javascript:showHideLogonForm()"/>
+    <form name="logon" action="index.php" method="POST" 
+              style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">
+        Username: <input type="text" name="user"/>
+        Password:  <input type="password" name="userpassword"/><br/>
+        <div class="error">
+          <?php
+             if (!$logonSuccess) echo "Invalid name and/or password";
+           ?>
+        </div>
+        <input type="submit" value="Edit My Wish List"/>
+    </form>
+</div>  
 ----
 A classe "logon" é aplicada em todo o form e a classe "error" é aplicada em uma mensagem de erro no form.
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ru.asciidoc
index 3b6b430..28166bd 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_ru.asciidoc
@@ -42,35 +42,12 @@
 :keywords: Apache NetBeans, Tutorials, Урок 8: усовершенствование внешнего облика приложения с использованием технологии CSS
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. 
-link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. link:wish-list-lesson6.html[+Добавление нового пожелания в базу данных+]
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. 
-*=>Усовершенствование внешнего вида приложения с использованием технологии CSS*
-
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В этом уроке вы научитесь выполнению следующих действий:
 
 
 Текущий документ является частью краткого учебного курса "Создание приложения CRUD в IDE NetBeans для PHP".
 
 
-
 == Исходный код приложения из предыдущего урока
 
 Для пользователей MySQL: перейдите по link:https://netbeans.org/files/documents/4/1933/lesson7.zip[+этой ссылке+] для загрузки исходного кода, описывающего состояние проекта на момент завершения предыдущего урока.
@@ -80,13 +57,13 @@
 
 == Скрытие форм
 
-Теперь на главной странице  ``index.php``  приложения отображаются полные формы "logon" и "showWishList". Для усовершенствования внешнего вида приложения можно скрыть формы и заменить их кнопками. При нажатии на кнопку соответствующая скрытая форма раскрывается.
+Теперь на главной странице  `index.php`  приложения отображаются полные формы "logon" и "showWishList". Для усовершенствования внешнего вида приложения можно скрыть формы и заменить их кнопками. При нажатии на кнопку соответствующая скрытая форма раскрывается.
 
 Для реализации этого выполните следующие действия:
 
-1. Добавьте блок <script></script> к файлу  ``index.php``  сразу перед закрывающим тегом </body>.
-2. <<javaScriptFunctions,Создайте две функции JavaScript внутри тегов <script></script>>>.
-3. <<showHideLogonInIndex,Внесите некоторые незначительные изменения в файл "index.php".>>
+1. Добавьте блок <script></script> к файлу  `index.php`  сразу перед закрывающим тегом </body>.
+2. <<_hiding_forms,Создайте две функции JavaScript внутри тегов <script></script>>>.
+3. <<_implementing_the_design_using_html_divs,Внесите некоторые незначительные изменения в файл "index.php".>>
 
 
 === Функции JavaScript
@@ -118,48 +95,50 @@
         document.all.showWishList.value = "<< Show Wish List of";
     }
 }
-</script>	
+</script>   
 ----
 
 
-=== Обновление  ``index.php`` 
+=== Обновление  `index.php` 
 
-1. Добавьте атрибут  ``style``  к форме "logon":
+1. Добавьте атрибут  `style`  к форме "logon":
 
 [source,php]
 ----
 
 <form name="logon" action="index.php" method="POST" 
-        *style="visibility:<?php if ($logonSuccess) echo "hidden";
-        else echo "visible";?>"*>
+        style="visibility:<?php if ($logonSuccess) echo "hidden";
+        else echo "visible";?>">
 ----
-Атрибут  ``style``  определяет, является форма скрытой или нет. Блок <?php ? > используется для поддержания отображения формы до тех пор, пока не будет выполнен успешный ввод данных пользователем.
+Атрибут  `style`  определяет, является форма скрытой или нет. Блок <?php ? > используется для поддержания отображения формы до тех пор, пока не будет выполнен успешный ввод данных пользователем.
 2. Введите следующий код перед кодом формы ввода "logon":
 
-[source,java]
+[source,php]
 ----
 
- <input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
 Код реализует кнопку с текстом "My Wishlist >>". Кнопка отображается вместо формы "logon". При нажатии кнопки вызывается функция "showHideLogonForm".
-3. Добавьте атрибут  ``style``  к форме "logon":
+3. Добавьте атрибут  `style`  к форме "logon":
 
 [source,xml]
 ----
 
-<form name="wishList" action="wishlist.php" method="GET" *style="visibility:hidden"*>
-Show wish list of: <input type="text" name="user"/><input type="submit" value="Go" /></form>
+<form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+Show wish list of: <input type="text" name="user"/>
+            <input type="submit" value="Go" />
+</form>
 ----
 4. Вставьте следующий код над формой wishList:
 
-[source,java]
+[source,xml]
 ----
 
-<input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+<input type="submit" name="showWishList" value="Show Wish List of" onclick="javascript:showHideShowWishListForm()"/>
 ----
 5. Удалите следующий код из формы, так как он уже помещен в кнопку:
 
-[source,java]
+[source,php]
 ----
 
 Show wishlist of: 
@@ -177,48 +156,70 @@
 
 1. Щелкните правой кнопкой мыши узел "Source Files" и выберите в контекстном меню "New > Cascading Style Sheet".
 2. На панели каскадной таблицы стилей в поле "File Name" введите "wishlist". Нажмите кнопку "Завершить". 
+
 image::images/newCascadingStyleSheetFile.png[]
-В дереве проекта отображается новый файл  ``wishlist.css`` .
+
+В дереве проекта отображается новый файл  `wishlist.css` .
 
 
 === Определение стилей CSS
 
-Откройте файл "wishlist.css". Файл уже содержит "корневой" класс, который можно удалить. Для получения копии файла  ``wishlist.css``  необходимо загрузить полную версию этого учебного курса поlink:https://netbeans.org/files/documents/4/1934/lesson8.zip[+этой+] ссылке. Код интуитивно понятен и содержит следующее:
+Откройте файл "wishlist.css". Файл уже содержит "корневой" класс, который можно удалить. Для получения копии файла  `wishlist.css`  необходимо загрузить полную версию этого учебного курса поlink:https://netbeans.org/files/documents/4/1934/lesson8.zip[+этой+] ссылке. Код интуитивно понятен и содержит следующее:
 
-* Два стиля: "body" и "input", которые автоматически применяются внутри любых тегов  ``<body></body>``  или  ``<input/>`` .
-* Классы CSS, которые применяются при их явном указании. Имена классов содержат точки в начале, например,  ``.createWishList`` . Некоторые классы используются многократно, например, класс ".error" применяется ко всем сообщениям об ошибках в приложении. Другие классы используются только однажды, например, ".showWishList", ".logon".
+* Два стиля: "body" и "input", которые автоматически применяются внутри любых тегов  `<body></body>`  или  `<input/>` .
+* Классы CSS, которые применяются при их явном указании. Имена классов содержат точки в начале, например,  `.createWishList` . Некоторые классы используются многократно, например, класс ".error" применяется ко всем сообщениям об ошибках в приложении. Другие классы используются только однажды, например, ".showWishList", ".logon".
 
 
 == Реализация дизайна с помощью отделений HTML
 
 Все рекомендации и предложения, касающиеся проектирования приложений, являются необязательными. Равно как и определения стиля выше, они являются только примером усовершенствования внешнего вида приложения.
 
-На примере ниже показано, как можно улучшить внешний вид страницы  ``index.php`` .
+На примере ниже показано, как можно улучшить внешний вид страницы  `index.php` .
 
-1. Для разрешения использования классов CSS, которые были определены, введите следующий код в блок  ``<head></head>`` :
-
-[source,java]
-----
-
-     <link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
-----
-Стили "body" и "input" автоматически применяются внутри соответствующих тегов, поэтому их необходимо указать явно.
-2. Для применения любого другого стиля (класса) к области заключите код, который реализует область, в теги  ``<div class=""></div>`` :
+1. Для разрешения использования классов CSS, которые были определены, введите следующий код в блок  `<head></head>` :
 
 [source,html]
 ----
 
- <div class="showWishList"><input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/><form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden"><input type="text" name="user"/><input type="submit" value="Go" /></form></div>
+<link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
+----
+Стили "body" и "input" автоматически применяются внутри соответствующих тегов, поэтому их необходимо указать явно.
+2. Для применения любого другого стиля (класса) к области заключите код, который реализует область, в теги  `<div class=""></div>` :
+
+[source,html]
+----
+
+<div class="showWishList">
+    <input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+    
+    <form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+       <input type="text" name="user"/>
+       <input type="submit" value="Go" />
+    </form>
+</div>
 ----
 
 *Примечание.* Если класс указывается в теге <div>, в начале не нужно указывать точки.
 
 3. Можно использовать вложенные теги <div>:
 
-[source,php]
+[source,html]
 ----
 
-<div class="logon"><input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/><form name="logon" action="index.php" method="POST" style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">Username: <input type="text" name="user"/>Password:  <input type="password" name="userpassword"/><br/><div class="error"><?phpif (!$logonSuccess) echo "Invalid name and/or password";?></div><input type="submit" value="Edit My Wish List"/></form></div>  
+<div class="logon">
+    <input type="submit" name="myWishList" value="My Wishlist" onclick="javascript:showHideLogonForm()"/>
+    <form name="logon" action="index.php" method="POST" 
+              style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">
+        Username: <input type="text" name="user"/>
+        Password:  <input type="password" name="userpassword"/><br/>
+        <div class="error">
+          <?php
+             if (!$logonSuccess) echo "Invalid name and/or password";
+           ?>
+        </div>
+        <input type="submit" value="Edit My Wish List"/>
+    </form>
+</div>  
 ----
 Класс "logon" применяется ко всей форме, а класс "error" применяется к сообщению об ошибке внутри формы.
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_zh_CN.asciidoc
index 36afda9..1c721e0 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson8_zh_CN.asciidoc
@@ -42,28 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, 第 8 课:使用 CSS 技术改进应用程序的外观
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. 
-link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. 
-*=>使用 CSS 技术改进应用程序的外观*
-
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 在本课程中,您将了解如何执行以下操作:
 
 
@@ -80,11 +58,11 @@
 
 == 隐藏窗体
 
-目前,应用程序的主  ``index.php``  页始终显示整个登录和 showWishList 窗体。要改进应用程序的外观,您可以隐藏窗体并将其替换为按钮。当用户按下按钮时,将展开相应的隐藏窗体。
+目前,应用程序的主  `index.php`  页始终显示整个登录和 showWishList 窗体。要改进应用程序的外观,您可以隐藏窗体并将其替换为按钮。当用户按下按钮时,将展开相应的隐藏窗体。
 
 实现该行为:
 
-1. 将 <script></script> 块添加到  ``index.php``  文件的结束 </body> 标记的正上方。
+1. 将 <script></script> 块添加到  `index.php`  文件的结束 </body> 标记的正上方。
 2. <<javaScriptFunctions,在 <script></script> 标记内开发两个 JavaScript 函数>>。
 3. <<showHideLogonInIndex,对 index.php 文件进行一些小的改动>>
 
@@ -118,48 +96,48 @@
         document.all.showWishList.value = "<< Show Wish List of";
     }
 }
-</script>	
+</script>   
 ----
 
 
-=== 更新  ``index.php`` 
+=== 更新  `index.php` 
 
-1. 在登录窗体中添加一个  ``style``  属性:
+1. 在登录窗体中添加一个  `style`  属性:
 
 [source,php]
 ----
 
-<form name="logon" action="index.php" method="POST" 
-        *style="visibility:<?php if ($logonSuccess) echo "hidden";
-        else echo "visible";?>"*>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
- ``style``  属性定义了是隐藏还是显示窗体。<?php ?> 块用于将窗体保持可见,直至用户成功登录。
+ `style`  属性定义了是隐藏还是显示窗体。<?php ?> 块用于将窗体保持可见,直至用户成功登录。
 2. 在登录输入窗体代码上方输入以下代码:
 
-[source,java]
+[source,php]
 ----
 
- <input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/>
+<input type="submit" name="myWishList" value="My Wishlist"> onclick="javascript:showHideLogonForm()"/>
 ----
 该代码实现一个包含 "My Wishlist >>" 文本的按钮。该按钮位于登录窗体所在的位置。如果按下该按钮,则会调用 showHideLogonForm 函数。
-3. 在 wishList 窗体中添加一个  ``style``  属性:
+3. 在 wishList 窗体中添加一个  `style`  属性:
 
 [source,xml]
 ----
 
-<form name="wishList" action="wishlist.php" method="GET" *style="visibility:hidden"*>
-Show wish list of: <input type="text" name="user"/><input type="submit" value="Go" /></form>
+<form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+Show wish list of: <input type="text" name="user"/>
+            <input type="submit" value="Go" />
+</form>
 ----
 4. 在 wishList 窗体上方输入以下代码:
 
-[source,java]
+[source,xml]
 ----
 
-<input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+<input type="submit" name="showWishList" value="Show Wish List of" onclick="javascript:showHideShowWishListForm()"/>
 ----
 5. 从窗体中删除以下代码,因为它已位于按钮上:
 
-[source,java]
+[source,php]
 ----
 
 Show wishlist of: 
@@ -177,48 +155,70 @@
 
 1. 在 "Source Files"(源文件)节点上单击鼠标右键,然后从上下文菜单中选择 "New"(新建)> "Cascading Style Sheet"(级联样式表)。
 2. 在 "Cascading Style Sheet"(级联样式表)面板的 "File Name"(文件名)编辑框中输入 wishlist。单击 "Finish"(完成)。
+
 image::images/newCascadingStyleSheetFile.png[]
-将在项目树中显示新文件  ``wishlist.css`` 。
+
+将在项目树中显示新文件  `wishlist.css` 。
 
 
 === 定义 CSS 样式
 
-打开 wishlist.css 文件。该文件已包含一个 "root" 类,您可以将其删除。您可以在link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+此处+]下载本教程的完成版本以获取  ``wishlist.css``  的副本。该代码简单直观并且包含:
+打开 wishlist.css 文件。该文件已包含一个 "root" 类,您可以将其删除。您可以在link:https://netbeans.org/files/documents/4/1934/lesson8.zip[+此处+]下载本教程的完成版本以获取  `wishlist.css`  的副本。该代码简单直观并且包含:
 
-* 两个样式("body" 和 "input"),它们是在任何  ``<body></body>``  或  ``<input/>``  标记内自动应用的。
-* 应用的 CSS 类(如果明确指定)。类名前面包含圆点,例如, ``.createWishList`` 。某些类可以多次使用,例如,将 ".error" 类应用于应用程序中的所有错误消息。另外一些类只能使用一次,例如,".showWishList"、".logon"。
+* 两个样式("body" 和 "input"),它们是在任何  `<body></body>`  或  `<input/>`  标记内自动应用的。
+* 应用的 CSS 类(如果明确指定)。类名前面包含圆点,例如, `.createWishList` 。某些类可以多次使用,例如,将 ".error" 类应用于应用程序中的所有错误消息。另外一些类只能使用一次,例如,".showWishList"、".logon"。
 
 
 == 使用 HTML Div 实现设计
 
 有关应用程序设计的所有建议都是可选的。与上面的样式定义一样,它们仅用于举例说明如何改进应用程序的外观。
 
-下面的示例介绍了如何改进  ``index.php``  页面的外观。
+下面的示例介绍了如何改进  `index.php`  页面的外观。
 
-1. 要启用定义的 CSS 类,请在  ``<head></head>``  块中输入以下代码:
-
-[source,java]
-----
-
-     <link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
-----
-将在相应标记内自动应用 "body" 和 "input" 样式,因此,您不需要明确指定这些样式。
-2. 要将任何其他样式(类)应用于某个区域,请将实现该区域的代码包含在  ``<div class=""></div>``  标记内:
+1. 要启用定义的 CSS 类,请在  `<head></head>`  块中输入以下代码:
 
 [source,html]
 ----
 
- <div class="showWishList"><input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/><form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden"><input type="text" name="user"/><input type="submit" value="Go" /></form></div>
+<link href="wishlist.css" type="text/css" rel="stylesheet" media="all" />
+----
+将在相应标记内自动应用 "body" 和 "input" 样式,因此,您不需要明确指定这些样式。
+2. 要将任何其他样式(类)应用于某个区域,请将实现该区域的代码包含在  `<div class=""></div>`  标记内:
+
+[source,html]
+----
+
+<div class="showWishList">
+    <input type="submit" name="showWishList" value="Show Wish List of >>" onclick="javascript:showHideShowWishListForm()"/>
+    
+    <form name="wishList" action="wishlist.php" method="GET" style="visibility:hidden">
+       <input type="text" name="user"/>
+       <input type="submit" value="Go" />
+    </form>
+</div>
 ----
 
 *注:*在 <div> 标记中指定类时,不需要在前面添加圆点。
 
 3. 您可以使用嵌入式 <div> 标记:
 
-[source,php]
+[source,html]
 ----
 
-<div class="logon"><input type="submit" name="myWishList" value="My Wishlist >>" onclick="javascript:showHideLogonForm()"/><form name="logon" action="index.php" method="POST" style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">Username: <input type="text" name="user"/>Password:  <input type="password" name="userpassword"/><br/><div class="error"><?phpif (!$logonSuccess) echo "Invalid name and/or password";?></div><input type="submit" value="Edit My Wish List"/></form></div>  
+<div class="logon">
+    <input type="submit" name="myWishList" value="My Wishlist" onclick="javascript:showHideLogonForm()"/>
+    <form name="logon" action="index.php" method="POST" 
+              style="visibility:<?php if ($logonSuccess) echo "hidden"; else echo "visible";?>">
+        Username: <input type="text" name="user"/>
+        Password:  <input type="password" name="userpassword"/><br/>
+        <div class="error">
+          <?php
+             if (!$logonSuccess) echo "Invalid name and/or password";
+           ?>
+        </div>
+        <input type="submit" value="Edit My Wish List"/>
+    </form>
+</div>  
 ----
 "logon" 类应用于整个窗体,而 "error" 类应用于窗体中的错误消息。
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9.asciidoc
index f099b67..10020bb 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9.asciidoc
@@ -37,10 +37,10 @@
 
 In this lesson you learn how to do the following:
 
-* <<registerHostingAccount,Register a hosting account >>
-* <<improveTableEmptyCells,Register an FTP account >>
-* <<designStyles,Create a remote MySQL database >>
-* <<divs,Set up your project to use the registered remote web hosting >>
+* <<_registering_an_email_account,Register a hosting account >>
+* <<_registering_a_hosting_account,Register an FTP account >>
+* <<_registering_an_ftp_account,Create a remote MySQL database >>
+* <<_setting_up_a_php_project_with_existing_sources_and_remote_web_site_run_configuration,Set up your project to use the registered remote web hosting >>
 * Change your database connection settings to use the remote database
 
 The current document is a part of the Creating a CRUD Application in the NetBeans IDE for PHP tutorial.
@@ -99,13 +99,13 @@
 
 == Creating a Remote Database
 
-Because the CRUD application uses a database you will also need to deploy the  ``wishlist``  MySQL database on the remote server where you have a <<registerHostingAccount,hosting account.>>
+Because the CRUD application uses a database you will also need to deploy the  `wishlist`  MySQL database on the remote server where you have a <<registerHostingAccount,hosting account.>>
 
 
 == Setting Up a PHP Project with Existing Sources and Remote Web Site Run Configuration
 
 * <<previousLessonSourceCode,Download the source files>> that correspond to the state of the application after the previous lesson is completed. Extract the files.
-* Save the source files in the  ``htdocs``  folder.
+* Save the source files in the  `htdocs`  folder.
 * Create a link:project-setup.html#importSources[+PHP project with existing sources+]:
 ** Specify the location of the downloaded sources in the Source folder
 ** Choose the link:project-setup.html#remiteWebSite[+Remote Web Site+] run configuration and configure the FTP connection
@@ -114,27 +114,28 @@
 
 == Updating the Class WishDB
 
-So far you have developed and run the Wish List application on the local web server and used a local MySQL or Oracle database server. To make your application work with the remote MySQL database, you need to update the connection settings specified through the variables of the class  ``WishDB`` .
+So far you have developed and run the Wish List application on the local web server and used a local MySQL or Oracle database server. To make your application work with the remote MySQL database, you need to update the connection settings specified through the variables of the class  `WishDB` .
 
-1. Open the file  ``db.php`` .
-2. Change the variables of the class  ``WishDB`` :
+1. Open the file  `db.php` .
+2. Change the variables of the class  `WishDB` :
 
 [source,php]
 ----
-var $user = "<the name of the remote database user>";        
-var $pass = "<the password of the remote database user>";
-var $dbName = "<the name of the remote database>";
-var $dbHost = "<the account username specified during the hosting account creation>";
+private $user = "<the name of the remote database user>";        
+private $pass = "<the password of the remote database user>";
+private $dbName = "<the name of the remote database>";
+private $dbHost = "<the account username specified during the hosting account creation>";
 ----
 
 In this example the variables will be updated as follows:
 
 [source,php]
 ----
-var $user = "phpuser";        
-var $pass = "phpuserpw";
-var $dbName = "wishlist";
-var $dbHost = "phpuser";
+
+private $user = "phpuser";
+private $pass = "phpuserpw";
+private $dbName = "wishlist";
+private $dbHost = "localhost";
 ----
 
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ja.asciidoc
index 701e86b..2b5586f 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ja.asciidoc
@@ -42,28 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, レッスン9: リモートWebサーバーへのアプリケーションのデプロイ
 
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するデータベース駆動型アプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. link:wish-list-oracle-lesson1.html[+Oracleデータベース表の作成+]
-3. 
-link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. 
-*=>リモートWebサーバーへのアプリケーションのデプロイ*
-
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 通常、実際のPHPアプリケーションはリモート・サーバー上で実行され、ファイル転送プロトコル(FTP)でアクセスされます。リモート・サーバー上にCRUDアプリケーションをデプロイするには、ホスティング・プロバイダでのアカウントの登録、FTPアカウントの登録、およびリモート・データベースの作成を行う必要があります。
 
 ホスティングは任意のものを使用できます。このドキュメントでは、X10HOSTINGフリー・ホスティングでのデプロイ手順について説明します。このホスティングにはMySQLが含まれますが、Oracleデータベース・サーバーは含まれません。
@@ -132,13 +110,13 @@
 
 == リモート・データベースの作成
 
-CRUDアプリケーションはデータベースを使用するため、<<registerHostingAccount,ホスティング・アカウント>>を持つリモート・サーバーにも ``wishlist``  MySQLデータベースをデプロイする必要があります。
+CRUDアプリケーションはデータベースを使用するため、<<registerHostingAccount,ホスティング・アカウント>>を持つリモート・サーバーにも `wishlist`  MySQLデータベースをデプロイする必要があります。
 
 
 == 既存のソースを使用したPHPプロジェクトの設定およびリモートWebサイトの実行構成
 
 1. 前のレッスンが完了した後のアプリケーションの状態に対応する<<previousLessonSourceCode,ソース・ファイルをダウンロード>>します。ファイルを抽出します。
-2. ソース・ファイルを ``htdocs`` フォルダに保存します。
+2. ソース・ファイルを `htdocs` フォルダに保存します。
 3. link:project-setup.html#importSources[+既存のソースを使用したPHPプロジェクト+]を作成するには:
 * ソース・フォルダのダウンロード済ソースの場所を指定する
 * link:project-setup.html#remiteWebSite[+リモートWebサイト+]の実行構成を選択し、FTP接続を構成する
@@ -147,30 +125,28 @@
 
 == クラスWishDBの更新
 
-これまでは、ウィッシュ・リスト・アプリケーションをローカルWebサーバーで開発して実行し、ローカルのMySQLまたはOracleデータベース・サーバーを使用しました。アプリケーションがリモートMySQLデータベースを操作できるようにするには、クラス ``WishDB`` の変数を使用して指定した接続設定を更新する必要があります。
+これまでは、ウィッシュ・リスト・アプリケーションをローカルWebサーバーで開発して実行し、ローカルのMySQLまたはOracleデータベース・サーバーを使用しました。アプリケーションがリモートMySQLデータベースを操作できるようにするには、クラス `WishDB` の変数を使用して指定した接続設定を更新する必要があります。
 
-1. ファイル ``db.php`` を開きます。
-2. クラス ``WishDB`` の変数を次のように変更します。
+1. ファイル `db.php` を開きます。
+2. クラス `WishDB` の変数を次のように変更します。
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "<the name of the remote database user>";        
-    var $pass = "<the password of the remote database user>";
-    var $dbName = "<the name of the remote database>";
-    var $dbHost = "<the account username specified during the hosting account creation>";
-
+private $user = "<the name of the remote database user>";        
+private $pass = "<the password of the remote database user>";
+private $dbName = "<the name of the remote database>";
+private $dbHost = "<the account username specified during the hosting account creation>";
 ----
 この例では、変数は次のように更新されます。
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "phpuser";        
-    var $pass = "phpuserpw";
-    var $dbName = "wishlist";
-    var $dbHost = "phpuser";
-
+private $user = "phpuser";
+private $pass = "phpuserpw";
+private $dbName = "wishlist";
+private $dbHost = "localhost";
 ----
 
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_pt_BR.asciidoc
index fef4014..581b3b7 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_pt_BR.asciidoc
@@ -41,29 +41,6 @@
 :description: Lição 9: Implantando a Aplicação em um Servidor Web Remoto - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Lição 9: Implantando a Aplicação em um Servidor Web Remoto
 
-
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação Orientada pelo Banco de Dados com o PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Criando Tabelas do Banco de Dados Oracle+]
-3. 
-link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo o Banco de Dados+]
-
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário de Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. 
-*=>Implantando a Aplicação em um Servidor Web Remoto*
-
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
 Normalmente, uma aplicação PHP de vida real é executada em um servidor remoto e é acessada por um Protocolo de Transferência de Arquivo (FTP - File Transfer Protocol). Para implantar a aplicação CRUD em um servidor remoto, você precisará registrar uma conta em um provedor de hospedagem, registrar uma conta de FTP e criar um banco de dados remoto.
 
 Você pode usar a hospedagem que quiser. O documento atual descreve o procedimento de implantação na hospedagem gratuita X10HOSTING. Essa hospedagem inclui um MySQL, mas não ums ervidor de banco de dados Oracle.
@@ -152,25 +129,23 @@
 1. Abra o arquivo  ``db.php`` .
 2. Altere as variáveis da classe  ``WishDB`` :
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "<the name of the remote database user>";        
-    var $pass = "<the password of the remote database user>";
-    var $dbName = "<the name of the remote database>";
-    var $dbHost = "<the account username specified during the hosting account creation>";
-
+private $user = "<the name of the remote database user>";        
+private $pass = "<the password of the remote database user>";
+private $dbName = "<the name of the remote database>";
+private $dbHost = "<the account username specified during the hosting account creation>";
 ----
 Nesse exemplo, as variáveis serão atualizadas como se segue:
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "phpuser";        
-    var $pass = "phpuserpw";
-    var $dbName = "wishlist";
-    var $dbHost = "phpuser";
-
+private $user = "phpuser";
+private $pass = "phpuserpw";
+private $dbName = "wishlist";
+private $dbHost = "localhost";
 ----
 
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ru.asciidoc
index 7ec2687..47d2a55 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_ru.asciidoc
@@ -41,29 +41,6 @@
 :description: Урок 9: Развертывание приложения на удаленном веб-сервере - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Урок 9: Развертывание приложения на удаленном веб-сервере
 
-
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения на основе базы данных с помощью языка PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. link:wish-list-oracle-lesson1.html[+Создание таблиц базы данных Oracle+]
-3. 
-link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. link:wish-list-lesson6.html[+Добавление нового пожелания в базу данных+]
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. 
-*=>Развертывание приложения на удаленном веб-сервере*
-
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 Как правило, в реальной жизни PHP-приложение запускается на удаленном сервере и доступно через протокол передачи файлов (FTP). Для развертывания приложения CRUD на удаленном сервере необходимо зарегистрировать учетную запись у поставщика услуг размещения, зарегистрировать учетную запись FTP и создать удаленную базу данных.
 
 Можно использовать любое размещение. В данном документе описывается процедура развертывания приложения на бесплатном размещении X10HOSTING. На этом размещении имеется сервер MySQL, но не сервер базы данных Oracle.
@@ -132,13 +109,13 @@
 
 == Создание удаленной базы данных
 
-Приложение CRUD использует базу данных, поэтому на удаленном сервере, на котором была создана <<registerHostingAccount,учетная запись размещения>>, также необходимо развернуть базу данных MySQL  ``wishlist`` .
+Приложение CRUD использует базу данных, поэтому на удаленном сервере, на котором была создана <<registerHostingAccount,учетная запись размещения>>, также необходимо развернуть базу данных MySQL  `wishlist` .
 
 
 == Настройка проекта PHP с существующими исходными файлами и настройкой выполнения "Удаленный веб-сайт"
 
 1. <<previousLessonSourceCode,Загрузите исходные файлы>>, описывающие состояние приложения на момент завершения предыдущего урока. Извлеките файлы.
-2. Сохраните исходные файлы в папке  ``htdocs`` .
+2. Сохраните исходные файлы в папке  `htdocs` .
 3. Создайте проект PHP link:project-setup.html#importSources[+ с существующими исходными файлами+]:
 * Укажите местоположение загруженных исходных файлов в папке в "Source".
 * Выберите настройку выполнения link:project-setup.html#remiteWebSite[+Удаленный веб-сайт+] и настройте подключение по FTP.
@@ -147,30 +124,28 @@
 
 == Обновление класса WishDB
 
-Вы уже создали и выполнили приложение Wish List на локальном сервере, а также использовали локальный сервер базы данных MySQL или Oracle. Чтобы ваше приложение работало с удаленной базой данных MySQL, необходимо обновить параметры подключения, указанные в переменных класса  ``WishDB`` .
+Вы уже создали и выполнили приложение Wish List на локальном сервере, а также использовали локальный сервер базы данных MySQL или Oracle. Чтобы ваше приложение работало с удаленной базой данных MySQL, необходимо обновить параметры подключения, указанные в переменных класса  `WishDB` .
 
-1. Откройте файл  ``db.php`` .
-2. Измените переменные класса  ``WishDB`` :
+1. Откройте файл  `db.php` .
+2. Измените переменные класса  `WishDB` :
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "<the name of the remote database user>";        
-    var $pass = "<the password of the remote database user>";
-    var $dbName = "<the name of the remote database>";
-    var $dbHost = "<the account username specified during the hosting account creation>";
-
+private $user = "<the name of the remote database user>";        
+private $pass = "<the password of the remote database user>";
+private $dbName = "<the name of the remote database>";
+private $dbHost = "<the account username specified during the hosting account creation>";
 ----
 В этом примере переменные обновляются следующим образом:
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "phpuser";        
-    var $pass = "phpuserpw";
-    var $dbName = "wishlist";
-    var $dbHost = "phpuser";
-
+private $user = "phpuser";
+private $pass = "phpuserpw";
+private $dbName = "wishlist";
+private $dbHost = "localhost";
 ----
 
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_zh_CN.asciidoc
index 1fc15ed..5f18384 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-lesson9_zh_CN.asciidoc
@@ -42,28 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, 第 9 课:将应用程序部署到远程 Web 服务器
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建数据库驱动的应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. link:wish-list-oracle-lesson1.html[+创建 Oracle 数据库表+]
-3. 
-link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. 
-*=>将应用程序部署到远程 Web 服务器*
-
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 通常,PHP 应用程序实际上在远程服务器上运行,并通过文件传输协议 (FTP) 进行访问。要在远程服务器上部署 CRUD 应用程序,您将需要向托管提供商注册一个普通帐户、注册一个 FTP 帐户并创建一个远程数据库。
 
 您可以使用您喜欢的任何托管。当前文档介绍 X10HOSTING 免费托管中的部署过程。此托管包括 MySQL,但不包括 Oracle 数据库服务器。
@@ -132,13 +110,13 @@
 
 == 创建远程数据库
 
-由于 CRUD 应用程序使用数据库,因此,您还将需要在具有<<registerHostingAccount,托管帐户>>的远程服务器上部署  ``wishlist``  MySQL 数据库。
+由于 CRUD 应用程序使用数据库,因此,您还将需要在具有<<registerHostingAccount,托管帐户>>的远程服务器上部署  `wishlist`  MySQL 数据库。
 
 
 == 使用现有源代码和远程 Web 站点运行配置设置 PHP 项目
 
 1. <<previousLessonSourceCode,下载源文件>>,这些文件与完成上一课后的应用程序状态相对应。解压缩文件。
-2. 在  ``htdocs``  文件夹中保存源文件。
+2. 在  `htdocs`  文件夹中保存源文件。
 3. 创建link:project-setup.html#importSources[+基于现有源代码的 PHP 项目+]:
 * 指定下载的源代码在“源”文件夹中的位置
 * 选择link:project-setup.html#remiteWebSite[+远程 Web 站点+]运行配置并配置 FTP 连接
@@ -147,30 +125,28 @@
 
 == 更新 WishDB 类
 
-到目前为止,您已在本地 Web 服务器上开发并运行“愿望列表”应用程序,并使用了本地的 MySQL 或 Oracle 数据库服务器。为使应用程序使用远程 MySQL 数据库,您需要更新通过  ``WishDB``  类的变量指定的连接设置。
+到目前为止,您已在本地 Web 服务器上开发并运行“愿望列表”应用程序,并使用了本地的 MySQL 或 Oracle 数据库服务器。为使应用程序使用远程 MySQL 数据库,您需要更新通过  `WishDB`  类的变量指定的连接设置。
 
-1. 打开文件  ``db.php`` 。
-2. 更改  ``WishDB``  类的变量:
+1. 打开文件  `db.php` 。
+2. 更改  `WishDB`  类的变量:
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "<the name of the remote database user>";        
-    var $pass = "<the password of the remote database user>";
-    var $dbName = "<the name of the remote database>";
-    var $dbHost = "<the account username specified during the hosting account creation>";
-
+private $user = "<the name of the remote database user>";        
+private $pass = "<the password of the remote database user>";
+private $dbName = "<the name of the remote database>";
+private $dbHost = "<the account username specified during the hosting account creation>";
 ----
 在此示例中,变量将进行如下更新:
 
-[source,java]
+[source,php]
 ----
 
-    var $user = "phpuser";        
-    var $pass = "phpuserpw";
-    var $dbName = "wishlist";
-    var $dbHost = "phpuser";
-
+private $user = "phpuser";
+private $pass = "phpuserpw";
+private $dbName = "wishlist";
+private $dbHost = "localhost";
 ----
 
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1.asciidoc
index b758152..02b984c 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1.asciidoc
@@ -41,32 +41,6 @@
 :keywords: Apache NetBeans, Tutorials, Lesson 1b: Creating Oracle Database Tables
 
 
-Tutorial contents:
-
-1. link:wish-list-tutorial-main-page.html[+Creating a CRUD Application with PHP - Main page+]
-2. 
-Creating the Database
-
-1. link:wish-list-lesson1.html[+Creating a MySQL Database+]
-2. 
-*=> Creating Oracle Database Tables*
-
-* <<CreateUser,Creating the Database User>>
-* <<DatabaseStructure,Designing the Structure of the Sample Database >>
-* <<CreateTables,Creating the Tables >>
-* <<add-sequence-trigger,Adding Sequences and Triggers to Increment the ID Values>>
-* <<EnterTestData,Entering the Test Data>>
-3. link:wish-list-lesson2.html[+ Designing the Application. Reading from the Database+]
-4. link:wish-list-lesson3.html[+Creating a New Application User+]
-5. link:wish-list-lesson4.html[+Optimizing the Code+]
-6. link:wish-list-lesson5.html[+Adding Security. Implementing Application User Logon+]
-7. link:wish-list-lesson6.html[+Adding a New Wish to the Database+]
-8. link:wish-list-lesson7.html[+Updating and Deleting Entries in the Database+]
-9. link:wish-list-lesson8.html[+Making the Application Look Better Using the CSS Technology+]
-10. link:wish-list-lesson9.html[+Deploying the Application on a Remote Web Server+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Content on this page applies to the NetBeans IDE 7.2, 7.3, 7.4 and 8.0"]
-
 This lesson describes the last preliminary step in developing the Wish List application, that of creating a sample database with test data. To complete the steps in this tutorial, you will need a database in which to store data of wishers. With the NetBeans IDE you can perform all these activities through the IDE interface. 
 Before starting, see the tutorial requirements described in link:wish-list-tutorial-main-page.html[+Creating a CRUD Application with PHP - Main page+].
 
@@ -103,10 +77,13 @@
 An example set of SQL commands for creating this user follows. These commands assume the database has the tablespaces USERS and TEMP.
 
 
-[source,java]
+[source,sql]
 ----
 
-drop user phpuser cascade;create user phpuser identified by phpuserpw;grant connect, resource to phpuser;alter user phpuser default tablespace users temporary tablespace temp account unlock; 
+drop user phpuser cascade;
+create user phpuser identified by phpuserpw;
+grant connect, resource to phpuser;
+alter user phpuser default tablespace users temporary tablespace temp account unlock;
 ----
 
 
@@ -143,19 +120,20 @@
 
 2. To create the wishers table, run the following SQL query:
 
-[source,java]
+[source,sql]
 ----
 
-create table wishers (id number not null,name varchar2(50) unique not null,password varchar2(50) not null,constraint wishers_pk primary key(id));
+create table wishers (id number not null,name varchar2(50) unique not null, password varchar2(50) not null, constraint wishers_pk primary key(id));
 ----
 3. To create the wishes table. run the following SQL query. Note that you create a foreign key, to associate wishes with a wisher.
 
-[source,java]
+[source,sql]
 ----
 
-create table wishes (id number not null,wisher_id number not null,description varchar2(255) not null,due_date date,constraint wishes_pk primary key(id),constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
+create table wishes (id number not null, wisher_id number not null,description varchar2(255) not null, due_date date, constraint wishes_pk primary key(id), constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
 ----
 4. Verify that the new tables are added to the database. If you are using NetBeans IDE to connect to the database, go to the Services window to the jdbc:oracle:thin:@localhost:1521:XE [phpuser on PHPUSER] connection node. The new tables are listed in the Tables node. (If they do not appear, right-click the connection and choose Refresh.) 
+
 image::images/tables-in-services-window.png[]
 
 Note: You can download a set of SQL commands for creating the Oracle Database tables link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+here+].
@@ -167,31 +145,43 @@
 
 1. To add a sequence for the wishers table, run the following SQL command:
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishers_id_seq start with 1 increment by 1;
 ----
 2. To trigger the sequence on the ID column of the wishers table when you add a new wisher, run the following SQL command:
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishers_insertbefore insert on wishersfor each rowbeginselect wishers_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishers_insert
+before insert on wishers
+for each row
+begin
+    select wishers_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 3. Add a sequence for the wishes table.
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishes_id_seq start with 1 increment by 1;
 ----
 4. Add a trigger to run the sequence on the ID column of the wishes table when you add a new wish.
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishes_insertbefore insert on wishesfor each rowbeginselect wishes_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishes_insert
+before insert on wishes
+for each row
+begin
+    select wishes_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 
 Note: You can download a set of SQL commands for creating the Oracle Database tables, including sequences and triggers, link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+here+].
@@ -203,31 +193,35 @@
 
 1. Add a wisher named Tom, with the password 'tomcat.'
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Tom','tomcat');
 ----
 2. Add a wisher named Jerry, with the password 'jerrymouse.'
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Jerry', 'jerrymouse');commit;
 ----
 3. Add the wishes.
 
-[source,java]
+[source,sql]
 ----
 
-insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description)values (2, 'Candle');commit;
+insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description)values (2, 'Candle');
+commit;
 ----
 4. Verify that you added test data. If you are using NetBeans IDE to view the test data, click the right mouse button on the relevant table and from the context menu choose View Data. 
+
 image::images/view-test-data.png[]
 
 To get some general understanding of database principles and design patterns, check the following tutorial: link:http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1[+http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1+].
 
-For more information on the syntax of Oracle  ``CREATE TABLE``  statements, see link:http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm[+http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm+].
+For more information on the syntax of Oracle  `CREATE TABLE`  statements, see link:http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm[+http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm+].
 
 Note: You can download a set of SQL commands for creating the Oracle Database tables link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+here+].
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ja.asciidoc
index a7f2984..010121f 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ja.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, レッスン1b: Oracleデータベース表の作成
 
 
-
-1. link:wish-list-tutorial-main-page.html[+PHPを使用するCRUDアプリケーションの作成 - メイン・ページ+]
-2. 
-データベースの作成
-
-1. link:wish-list-lesson1.html[+MySQLデータベースの作成+]
-2. 
-*=> Oracleデータベース表の作成*
-
-3. link:wish-list-lesson2.html[+アプリケーションの設計。データベースからの読取り+]
-4. link:wish-list-lesson3.html[+新規アプリケーション・ユーザーの作成+]
-5. link:wish-list-lesson4.html[+コードの最適化+]
-6. link:wish-list-lesson5.html[+セキュリティの追加。アプリケーション・ユーザー・ログオンの実装+]
-7. link:wish-list-lesson6.html[+データベースへの新しいウィッシュの追加+]
-8. link:wish-list-lesson7.html[+データベース内のエントリの更新および削除+]
-9. link:wish-list-lesson8.html[+CSSテクノロジを使用したアプリケーションの外観の改良+]
-10. link:wish-list-lesson9.html[+リモートWebサーバーへのアプリケーションのデプロイ+]
-
-image::images/netbeans-stamp-80-74-73.png[title="このページの内容は、NetBeans IDE 7.2、7.3、7.4および8.0に適用されます"]
-
 このレッスンでは、ウィッシュ・リスト・アプリケーションの開発での最後の準備手順である、テスト・データを持つサンプルのデータベースの作成を示します。このチュートリアルの手順を完了するには、ウィッシャのデータを格納するデータベースが必要です。NetBeans IDEでは、IDEのインタフェースを使用して、これらのアクティビティをすべて実行できます。
 始める前に、link:wish-list-tutorial-main-page.html[+PHPを使用するCRUDアプリケーションの作成 - メイン・ページ+]にあるチュートリアルの要件を確認してください。
 
@@ -98,10 +78,13 @@
 このユーザーを作成するためのSQLコマンド・セットの例を次に示します。これらのコマンドでは、データベースに表領域USERSおよびTEMPが存在することが前提になります。
 
 
-[source,java]
+[source,sql]
 ----
 
-drop user phpuser cascade;create user phpuser identified by phpuserpw;grant connect, resource to phpuser;alter user phpuser default tablespace users temporary tablespace temp account unlock; 
+drop user phpuser cascade;
+create user phpuser identified by phpuserpw;
+grant connect, resource to phpuser;
+alter user phpuser default tablespace users temporary tablespace temp account unlock;
 ----
 
 
@@ -138,19 +121,20 @@
 
 2. wishers表を作成するには、次のSQL問合せを実行します。
 
-[source,java]
+[source,sql]
 ----
 
-create table wishers (id number not null,name varchar2(50) unique not null,password varchar2(50) not null,constraint wishers_pk primary key(id));
+create table wishers (id number not null,name varchar2(50) unique not null, password varchar2(50) not null, constraint wishers_pk primary key(id));
 ----
 3. wishes表を作成するには、次のSQL問合せを実行します。wishesとwisherを関連付けるために、外部キーを作成します。
 
-[source,java]
+[source,sql]
 ----
 
-create table wishes (id number not null,wisher_id number not null,description varchar2(255) not null,due_date date,constraint wishes_pk primary key(id),constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
+create table wishes (id number not null, wisher_id number not null,description varchar2(255) not null, due_date date, constraint wishes_pk primary key(id), constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
 ----
 4. 新しい表がデータベースに追加されたことを確認します。NetBeans IDEを使用してデータベースに接続している場合、「サービス」ウィンドウのjdbc:oracle:thin:@localhost:1521:XE [PHPUSERのphpuser]接続ノードに移動します。新しい表が「表」ノードに一覧表示されます。(それらが表示されない場合、接続を右クリックして「リフレッシュ」を選択します。)
+
 image::images/tables-in-services-window.png[]
 
 注意: Oracleデータベース表を作成するための一連のSQLコマンドは、link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+ここ+]からダウンロードできます。
@@ -162,17 +146,23 @@
 
 1. wishers表の順序を追加するには、次のSQLコマンドを実行します。
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishers_id_seq start with 1 increment by 1;
 ----
 2. 新しいウィッシャを追加したときにwishers表のID列で順序をトリガーするには、次のSQLコマンドを実行します。
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishers_insertbefore insert on wishersfor each rowbeginselect wishers_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishers_insert
+before insert on wishers
+for each row
+begin
+    select wishers_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 3. wishes表の順序を追加します。
 
@@ -183,10 +173,16 @@
 ----
 4. 新しいウィッシュを追加したときにwishes表のID列で順序を実行するためのトリガーを追加します。
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishes_insertbefore insert on wishesfor each rowbeginselect wishes_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishes_insert
+before insert on wishes
+for each row
+begin
+    select wishes_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 
 注意: 順序およびトリガーを含む、Oracleデータベース表を作成するための一連のSQLコマンドは、link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+ここ+]からダウンロードできます。
@@ -198,26 +194,31 @@
 
 1. Tomという名前でパスワードが「tomcat」のウィッシャを追加します。
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Tom','tomcat');
 ----
 2. Jerryという名前でパスワードが「jerrymouse」のウィッシャを追加します。
 
-[source,java]
+
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Jerry', 'jerrymouse');commit;
 ----
 3. ウィッシュを追加します。
 
-[source,java]
+[source,sql]
 ----
 
-insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description)values (2, 'Candle');commit;
+insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description)values (2, 'Candle');
+commit;
 ----
 4. テスト・データを追加したことを確認します。NetBeans IDEを使用してテスト・データを表示する場合、関連する表でマウスの右ボタンをクリックし、コンテキスト・メニューから「データを表示」を選択します。
+
 image::images/view-test-data.png[]
 
 データベースの原則とデザイン・パターンの一般的な知識については、チュートリアルlink:http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1[+http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1+]を確認してください。
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_pt_BR.asciidoc
index 4565c9a..9c52bcb 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_pt_BR.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, Lição 1b: Criando Tabelas do Banco de Dados Oracle
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Criando uma Aplicação CRUD com PHP - Página Principal+]
-2. 
-Criando o Banco de Dados
-
-1. link:wish-list-lesson1.html[+Criando um Banco de Dados MySQL+]
-2. 
-*=> Criando Tabelas do Banco de Dados Oracle*
-
-3. link:wish-list-lesson2.html[+Projetando a Aplicação. Lendo do Banco de Dados+]
-4. link:wish-list-lesson3.html[+Criando um Novo Usuário da Aplicação+]
-5. link:wish-list-lesson4.html[+Otimizando o Código+]
-6. link:wish-list-lesson5.html[+Adicionando Segurança. Implementando o Log-in de Usuário da Aplicação+]
-7. link:wish-list-lesson6.html[+Adicionando um Novo Desejo ao Banco de Dados+]
-8. link:wish-list-lesson7.html[+Atualizando e Deletando Entradas no Banco de Dados+]
-9. link:wish-list-lesson8.html[+Melhorando a Aparência da Aplicação Usando a Tecnologia CSS+]
-10. link:wish-list-lesson9.html[+Implantando a Aplicação em um Servidor Web Remoto+]
-
-image::images/netbeans-stamp-80-74-73.png[title="O conteúdo desta página se aplica ao NetBeans IDE 7.2, 7.3, 7.4 e 8.0"]
-
 Esta lição descreve a última etapa preliminar no desenvolvimento da aplicação da Lista de Desejos: a criação de um banco de dados de amostra com dados de teste. Para concluir as etapas deste tutorial, você precisará de um banco de dados para armazenar os dados dos wishers. Com o NetBeans IDE, você pode realizar todas essas atividades usando a interface do IDE. 
 Antes de começar, veja os requisitos do tutorial descritos em link:wish-list-tutorial-main-page.html[+Criando uma Aplicação CRUD com PHP - Página Principal+].
 
@@ -98,10 +78,13 @@
 Segue um exemplo de conjunto de comandos SQL para criar esst usuário. Esses comandos presumem que o banco de dados tem os espaços de tabela USERS e TEMP.
 
 
-[source,java]
+[source,sql]
 ----
 
-drop user phpuser cascade;create user phpuser identified by phpuserpw;grant connect, resource to phpuser;alter user phpuser default tablespace users temporary tablespace temp account unlock; 
+drop user phpuser cascade;
+create user phpuser identified by phpuserpw;
+grant connect, resource to phpuser;
+alter user phpuser default tablespace users temporary tablespace temp account unlock;
 ----
 
 
@@ -138,19 +121,20 @@
 
 2. Para criar a tabela wishers, execute a seguinte consulta SQL:
 
-[source,java]
+[source,sql]
 ----
 
-create table wishers (id number not null,name varchar2(50) unique not null,password varchar2(50) not null,constraint wishers_pk primary key(id));
+create table wishers (id number not null,name varchar2(50) unique not null, password varchar2(50) not null, constraint wishers_pk primary key(id));
 ----
 3. Para criar a tabela wishes, execute a consulta SQL a seguir. Observe que você cria uma chave estrangeira que associa wishes com um wisher.
 
-[source,java]
+source,sql]
 ----
 
-create table wishes (id number not null,wisher_id number not null,description varchar2(255) not null,due_date date,constraint wishes_pk primary key(id),constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
+create table wishes (id number not null, wisher_id number not null,description varchar2(255) not null, due_date date, constraint wishes_pk primary key(id), constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
 ----
 4. Verifique se as novas tabelas são adicionadas no banco de dados. Se você estiver usando o NetBeans IDE para se conetar ao banco de dados, acesse a janela Serviços do nó de conexão jdbc:oracle:thin:@localhost:1521:XE [phpuser on PHPUSER]. As novas tabelas serão listadas no nó Tabelas. (Se elas não aparecerem, clique com o botão direito do mouse na conexão e selecione Atualizar.) 
+
 image::images/tables-in-services-window.png[]
 
 Observação: Você pode fazer download de um conjunto de comandos SQL para criar as tabelas do Banco de Dados Oracle link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+aqui+].
@@ -162,31 +146,47 @@
 
 1. Para adicionar uma sequência na tabela wishers, execute o seguinte comando SQL:
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishers_id_seq start with 1 increment by 1;
 ----
 2. Para acionar a sequência na coluna ID da tabela wishers quando você adiciona um novo wisher, execute o seguinte comando SQL:
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishers_insertbefore insert on wishersfor each rowbeginselect wishers_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishers_insert
+before insert on wishers
+for each row
+begin
+    select wishers_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 3. Adicione uma sequência à tabela wishes.
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishes_id_seq start with 1 increment by 1;
 ----
+4. Add a trigger to run the sequence on the ID column of the wishes table when you add a new wish.
+
+[source,sql]
+----
 4. Adicione um trigger para executar a sequência na coluna ID da tabela wishes quando você adiciona um novo wish.
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishes_insertbefore insert on wishesfor each rowbeginselect wishes_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishes_insert
+before insert on wishes
+for each row
+begin
+    select wishes_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 
 Observação: Você pode fazer download de um conjunto de comandos SQL para criar as tabelas do Banco de Dados Oracle, incluindo sequências e triggers, link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+aqui+].
@@ -198,26 +198,30 @@
 
 1. Adicione um wisher chamado Tom com a senha "tomcat".
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Tom','tomcat');
 ----
 2. Adicione um wisher chamado Jerry com a senha "jerrymouse".
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Jerry', 'jerrymouse');commit;
 ----
 3. Adicione os wishes.
 
-[source,java]
+[source,sql]
 ----
 
-insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description)values (2, 'Candle');commit;
+insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description)values (2, 'Candle');
+commit;
 ----
 4. Verifique se você adicionou dados de teste. Se você estiver usando o NetBeans IDE para exibir os dados de teste, clique com o botão direito do mouse na tabela relevante e, no menu de contexto, selecione Exibir Dados. 
+
 image::images/view-test-data.png[]
 
 Para obter um entendimento geral dos princípios de bancos de dados e padrões de design, consulte o tutorial: link:http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1[+http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1+].
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ru.asciidoc
index 27572f5..a993d3e 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_ru.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, Урок 1б: создание таблиц базы данных Oracle
 
 
-
-1. link:wish-list-tutorial-main-page.html[+Создание приложения типа CRUD на языке PHP – главная страница+]
-2. 
-Создание базы данных
-
-1. link:wish-list-lesson1.html[+Создание базы данных MySQL+]
-2. 
-*=> Создание таблиц базы данных Oracle*
-
-3. link:wish-list-lesson2.html[+Проектирование приложения. Чтение из базы данных+]
-4. link:wish-list-lesson3.html[+Создание нового пользователя приложения+]
-5. link:wish-list-lesson4.html[+Усовершенствование кода+]
-6. link:wish-list-lesson5.html[+Добавление функций безопасности. Реализация входа пользователя в приложение+]
-7. link:wish-list-lesson6.html[+Добавление к базе данных новых желаний+]
-8. link:wish-list-lesson7.html[+Обновление и удаление записей в базе данных+]
-9. link:wish-list-lesson8.html[+Усовершенствование внешнего вида приложения с использованием технологии CSS+]
-10. link:wish-list-lesson9.html[+Развертывание приложения на удаленном веб-сервере+]
-
-image::images/netbeans-stamp-80-74-73.png[title="Содержимое этой страницы применимо к IDE NetBeans 7.2, 7.3, 7.4 и 8.0"]
-
 В данном уроке описывается последний подготовительный этап разработки приложения "Wish List" ("Список желаний") в рамках создания демонстрационной базы данных с тестовыми данными. Для выполнения всех этапов, предложенных в данном руководстве, необходима база данных, которая позволит сохранять данные (желания), введенные пользователями. IDE NetBeans позволяет выполнять все эти действия с помощью интерфейса IDE. 
 Перед началом работы ознакомьтесь с требованиями, описанными в разделе link:wish-list-tutorial-main-page.html[+Создание приложения типа CRUD на языке PHP – главная страница+].
 
@@ -98,10 +78,13 @@
 Ниже приведен пример набора команд SQL для создания этого пользователя. Для выполнения этих команд предполагается, что в базе данных имеются табличные пространства USERS и TEMP.
 
 
-[source,java]
+[source,sql]
 ----
 
-drop user phpuser cascade;create user phpuser identified by phpuserpw;grant connect, resource to phpuser;alter user phpuser default tablespace users temporary tablespace temp account unlock; 
+drop user phpuser cascade;
+create user phpuser identified by phpuserpw;
+grant connect, resource to phpuser;
+alter user phpuser default tablespace users temporary tablespace temp account unlock;
 ----
 
 
@@ -138,19 +121,20 @@
 
 2. Чтобы создать таблицу wishers, выполните следующий запрос SQL:
 
-[source,java]
+[source,sql]
 ----
 
-create table wishers (id number not null,name varchar2(50) unique not null,password varchar2(50) not null,constraint wishers_pk primary key(id));
+create table wishers (id number not null,name varchar2(50) unique not null, password varchar2(50) not null, constraint wishers_pk primary key(id));
 ----
 3. Чтобы создать таблицу wishes, выполните следующий запрос SQL. Обратите внимание на то, что для связывания пожеланий и пользователей, оставивших пожелания, создается внешний ключ.
 
-[source,java]
+[source,sql]
 ----
 
-create table wishes (id number not null,wisher_id number not null,description varchar2(255) not null,due_date date,constraint wishes_pk primary key(id),constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
+create table wishes (id number not null, wisher_id number not null,description varchar2(255) not null, due_date date, constraint wishes_pk primary key(id), constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
 ----
 4. Убедитесь в том, что к базе данных добавлены новые таблицы. При соединении с базой данных с помощью IDE NetBeans перейдите в окне 'Службы' к узлу соединения jdbc:oracle:thin:@localhost:1521:XE [phpuser on PHPUSER]. Новые таблицы приведены в узле "Tables" (Таблицы). (Если они не отображаются, щелкните подключение правой кнопкой мыши и выберите команду "Refresh" (Обновить)). 
+
 image::images/tables-in-services-window.png[]
 
 Примечание. Набор команд SQL для создания таблиц базы данных Oracle можно загрузить link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+здесь+].
@@ -162,31 +146,43 @@
 
 1. Чтобы добавить последовательность для таблицы wishers, выполните следующую команду SQL:
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishers_id_seq start with 1 increment by 1;
 ----
 2. Чтобы инициировать последовательность в столбце идентификаторов таблицы wishers при добавлении нового пользователя, оставившего запись, выполните следующую команду SQL:
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishers_insertbefore insert on wishersfor each rowbeginselect wishers_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishers_insert
+before insert on wishers
+for each row
+begin
+    select wishers_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 3. Добавьте последовательность для таблицы wishes.
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishes_id_seq start with 1 increment by 1;
 ----
 4. Добавьте триггер, запускающий последовательность в столбце идентификаторов таблицы wishes при добавлении нового пожелания.
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishes_insertbefore insert on wishesfor each rowbeginselect wishes_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishes_insert
+before insert on wishes
+for each row
+begin
+    select wishes_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 
 Примечание. Набор команд SQL для создания таблиц базы данных Oracle, включая последовательности и триггеры, можно загрузить link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+здесь+].
@@ -198,26 +194,30 @@
 
 1. Добавьте пользователя с именем Tom и паролем "tomcat".
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Tom','tomcat');
 ----
 2. Добавьте пользователя с именем Jerry и паролем "jerrymouse".
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Jerry', 'jerrymouse');commit;
 ----
 3. Добавьте пожелания.
 
-[source,java]
+[source,sql]
 ----
 
-insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description)values (2, 'Candle');commit;
+insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description)values (2, 'Candle');
+commit;
 ----
 4. Убедитесь в том, что данные добавлены. При использовании IDE NetBeans для просмотра данных проверки, щелкните правой кнопкой мыши соответствующую таблицу и выберите в контекстном меню 'Просмотреть данные'. 
+
 image::images/view-test-data.png[]
 
 Ознакомиться с общими принципами организации баз данных и их моделями можно с помощью следующего обучающего руководства: link:http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1[+http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1+].
diff --git a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_zh_CN.asciidoc
index f0d64b4..7cafdb3 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/wish-list-oracle-lesson1_zh_CN.asciidoc
@@ -42,26 +42,6 @@
 :keywords: Apache NetBeans, Tutorials, 第 1b 课:创建 Oracle 数据库表
 
 
-
-1. link:wish-list-tutorial-main-page.html[+使用 PHP 创建 CRUD 应用程序 - 主页+]
-2. 
-创建数据库
-
-1. link:wish-list-lesson1.html[+创建 MySQL 数据库+]
-2. 
-*=> 创建 Oracle 数据库表*
-
-3. link:wish-list-lesson2.html[+设计应用程序。从数据库读取数据+]
-4. link:wish-list-lesson3.html[+创建新的应用程序用户+]
-5. link:wish-list-lesson4.html[+优化代码+]
-6. link:wish-list-lesson5.html[+添加安全功能。实现应用程序用户登录+]
-7. link:wish-list-lesson6.html[+在数据库中添加新的愿望+]
-8. link:wish-list-lesson7.html[+更新和删除数据库中的条目+]
-9. link:wish-list-lesson8.html[+使用 CSS 技术改进应用程序的外观+]
-10. link:wish-list-lesson9.html[+将应用程序部署到远程 Web 服务器+]
-
-image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 7.2、7.3、7.4 和 8.0"]
-
 本课程介绍在开发愿望列表应用程序时的最后一个预备步骤,即,使用测试数据创建样例数据库。要完成本教程中的步骤,您需要创建一个数据库以存储许愿者的数据。使用 NetBeans IDE,您可以通过 IDE 界面执行所有这些活动。
 开始之前,请参见link:wish-list-tutorial-main-page.html[+使用 PHP 创建 CRUD 应用程序 - 主页+]中介绍的教程要求。
 
@@ -98,10 +78,13 @@
 下面是一组用于创建该用户的示例 SQL 命令。这些命令假定数据库具有 USERS 和 TEMP 表空间。
 
 
-[source,java]
+[source,sql]
 ----
 
-drop user phpuser cascade;create user phpuser identified by phpuserpw;grant connect, resource to phpuser;alter user phpuser default tablespace users temporary tablespace temp account unlock; 
+drop user phpuser cascade;
+create user phpuser identified by phpuserpw;
+grant connect, resource to phpuser;
+alter user phpuser default tablespace users temporary tablespace temp account unlock;
 ----
 
 
@@ -138,19 +121,20 @@
 
 2. 要创建 wishers 表,请运行以下 SQL 查询:
 
-[source,java]
+[source,sql]
 ----
 
-create table wishers (id number not null,name varchar2(50) unique not null,password varchar2(50) not null,constraint wishers_pk primary key(id));
+create table wishers (id number not null,name varchar2(50) unique not null, password varchar2(50) not null, constraint wishers_pk primary key(id));
 ----
 3. 要创建 wishes 表,请运行以下 SQL 查询。请注意,将创建一个外键,使愿望与许愿者相关联。
 
-[source,java]
+[source,sql]
 ----
 
-create table wishes (id number not null,wisher_id number not null,description varchar2(255) not null,due_date date,constraint wishes_pk primary key(id),constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
+create table wishes (id number not null, wisher_id number not null,description varchar2(255) not null, due_date date, constraint wishes_pk primary key(id), constraint wishes_fk1 foreign key(wisher_id) references wishers(id));
 ----
 4. 验证是否将新表添加到数据库中。如果使用 NetBeans IDE 连接到数据库,请转至 "Services"(服务)窗口中的 jdbc:oracle:thin:@localhost:1521:XE [PHPUSER 上的 phpuser] 连接节点。将在 "Tables"(表)节点中列出新表。(如果未显示这些表,请右键单击连接,然后选择 "Refresh"(刷新)。) 
+
 image::images/tables-in-services-window.png[]
 
 注:您可以在link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+此处+]下载一组 SQL 命令以创建 Oracle 数据库表。
@@ -162,31 +146,43 @@
 
 1. 要为 wishers 表添加序列,请运行以下 SQL 命令:
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishers_id_seq start with 1 increment by 1;
 ----
 2. 要在添加新的许愿者时在 wishers 表的 ID 列上触发序列,请运行以下 SQL 命令:
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishers_insertbefore insert on wishersfor each rowbeginselect wishers_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishers_insert
+before insert on wishers
+for each row
+begin
+    select wishers_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 3. 为 wishes 表添加一个序列。
 
-[source,java]
+[source,sql]
 ----
 
 create sequence wishes_id_seq start with 1 increment by 1;
 ----
 4. 添加一个触发器,以便在添加新的愿望时在 wishes 表的 ID 列上运行序列。
 
-[source,java]
+[source,sql]
 ----
 
-create or replace trigger wishes_insertbefore insert on wishesfor each rowbeginselect wishes_id_seq.nextval into :new.id from dual;end;/
+create or replace trigger wishes_insert
+before insert on wishes
+for each row
+begin
+    select wishes_id_seq.nextval into :new.id from dual;
+end;
+/
 ----
 
 注:您可以在link:https://netbeans.org/projects/www/downloads/download/php%252FSQL-files-for-Oracle.zip[+此处+]下载一组 SQL 命令以创建 Oracle 数据库表。
@@ -198,26 +194,30 @@
 
 1. 添加一个名为 Tom 且口令为 tomcat 的许愿者。
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Tom','tomcat');
 ----
 2. 添加一个名为 Jerry 且口令为 jerrymouse 的许愿者。
 
-[source,java]
+[source,sql]
 ----
 
 insert into wishers (name, password) values ('Jerry', 'jerrymouse');commit;
 ----
 3. 添加愿望。
 
-[source,java]
+[source,sql]
 ----
 
-insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));insert into wishes (wisher_id, description)values (2, 'Candle');commit;
+insert into wishes (wisher_id, description, due_date) values (1, 'Sausage', to_date('2008-04-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description) values (1, 'Icecream');insert into wishes (wisher_id, description, due_date) values (2, 'Cheese', to_date('2008-05-01', 'YYYY-MM-DD'));
+insert into wishes (wisher_id, description)values (2, 'Candle');
+commit;
 ----
 4. 验证是否添加了测试数据。如果使用 NetBeans IDE 查看测试数据,请在相关表上单击鼠标右键,然后从上下文菜单中选择 "View Data"(查看数据)。 
+
 image::images/view-test-data.png[]
 
 要大致了解数据库原理和设计模式,请查阅以下教程:link:http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1[+http://www.tekstenuitleg.net/en/articles/database_design_tutorial/1+]。
diff --git a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast.asciidoc
index ee49cc2..c6909ab 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast.asciidoc
@@ -34,11 +34,7 @@
 
 Author: Jeff Rubinoff
 Time: 11:52 
+
 link:http://bits.netbeans.org/media/zf.flv[+Download+] (30.2 MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: Zend Framework Support Screencast[+Send Feedback on This Tutorial+]
- 
-|===
-
-  
-
+|===
\ No newline at end of file
diff --git a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ja.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ja.asciidoc
index f51a6b7..2bde093 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ja.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ja.asciidoc
@@ -34,9 +34,9 @@
 
 作成者: Jeff Rubinoff
 時間: 11:52
+
 link:http://bits.netbeans.org/media/zf.flv[+ダウンロード+] (30.2MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: Zend Framework Support Screencast[+このチュートリアルに関するご意見をお寄せください+]
  
 |===
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_pt_BR.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_pt_BR.asciidoc
index 4966ae8..4171629 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_pt_BR.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_pt_BR.asciidoc
@@ -34,11 +34,7 @@
 
 Autor: Jeff Rubinoff
 Tempo: 11:52 
+
 link:http://bits.netbeans.org/media/zf.flv[+Download+] (30,2 MB)
-
-link:/about/contact_form.html?to=3&subject=Feedback: Zend Framework Support Screencast[+Enviar Feedback neste Tutorial+]
  
-|===
-
-  
-
+|===
\ No newline at end of file
diff --git a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ru.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ru.asciidoc
index 15fdb01..8005dce 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ru.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_ru.asciidoc
@@ -34,9 +34,8 @@
 
 Автор: Джеф Рубинов (Jeff Rubinoff)
 Продолжительность: 11:52 
-link:http://bits.netbeans.org/media/zf.flv[+Загрузить+] [30,2 МБ]
 
-link:/about/contact_form.html?to=3&subject=Feedback: Zend Framework Support Screencast[+Отправить отзыв по этому учебному курсу+]
+link:http://bits.netbeans.org/media/zf.flv[+Загрузить+] [30,2 МБ]
  
 |===
 
diff --git a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_zh_CN.asciidoc b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_zh_CN.asciidoc
index e35f17a..6c37a7f 100644
--- a/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_zh_CN.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/php/zend-framework-screencast_zh_CN.asciidoc
@@ -34,11 +34,8 @@
 
 作者:Jeff Rubinoff
 播放时长:11:52 
+
 link:http://bits.netbeans.org/media/zf.flv[+下载+] (30.2 MB)
 
-link:/about/contact_form.html?to=3&subject=Feedback: Zend Framework Support Screencast[+发送有关此教程的反馈意见+]
  
-|===
-
-  
-
+|===
\ No newline at end of file