Senin, 21 Mei 2012

PHP Script How To Insert, Update, and Delete Data Using Adobe Dreamweaver CS 5

There are some functions of Adobe Dreamweaver CS 5. That software can be used to make a website. In fact there are so many software which can be used to make a website but i think Adobe Dreamweaver CS 5 is the best. Now in this blog, i want to tell you about PHP script how to insert, update and delete data using Adobe Dreamweaver CS 5. Before you make script, you must have a database for the repository of data. In there make a database like this picture below. 


After you make a database, you must have a connection file so that php file can connect with our database. Type this script below, save the file and give name connection.php!


First, we start with how to insert data to database than edit data and the last is delete data from database. The steps are:
1. Before we make an action file for insert data, we must have a form insert as place for user to type data which want to insert to database. Type this script below, save the file and give name insert.form.php!
   The display from that script will be like this:


2. Make an insert action file as a query command for insert data to database by create a php file and give name insert.action.php!


3. From script above, we know that after we click save button, the page will automatically redirect to look.php file. In that file we can see all data content from database. Now make look.php with script below!


4. Now try to insert data like the picture below then click save button!


5. If your insert.action.php script right, after you click save button it will be appear an alert like that.


6. Then after you click OK button, you will automatically redirect to look.php file.


7. Afer that make a php file and give name edit.form.php. That file containing form to edit data from database. Type the script below in that file!


8. Before you can edit data, you must make an action for edit data. Make a php file with name edit.action.php and type the script below!


9. If your script right, after you click edit button in look.php then will appear a page like this!


10. Now you can edit that data. After you edit data click save button to save change to database! If your script right there will appear an alert like this!


11. The last is delete data. Make a php file and give name delete.php! Type the script below in that file!


12. If your script right, after you click delete button in look.php there will appear an alert like this!



Ok, that’s all tips and trick from me about PHP script how to insert, edit and delete data using Adobe Dreamweaver CS 5. If you still confuse or still have an error in your script, you can ask to me by writing comment below or send it via email to regha_9812@yahoo.co.id
Thanks all see you in the next tutorial :D


Writter : Regha Julian Pradhana

Tidak ada komentar:

Posting Komentar