Posted by Shek on August 11, 2011 under HTML, JavaScript |
In this post, I am going to show how to use the same JavaScript function for different HTML forms, this could help in situations when multiple forms need to preform the same operation but with different inputs.
Read more of this article »
Posted by Shek on May 18, 2008 under PHP |
Editor’s note: To create a HTML form with just a few text fields and a few HTML form elements is easy, but in a stock control system or price input system for example, there might be a need for many text fields and different HTML form elements repeatedly appear in the HTML form. To type in the codes of all of them will take too much time. Therefore a PHP for loop and a table is good for this task.
Read more of this article »
Posted by Shek on under PHP |
Editor’s note: In some cases which the user might need to empty a table in the MySQL database. Instead of deleting every record in the MySQL database, you could run a query “truncate table ‘tablename’” to do the job.
Read more of this article »
Tags: Button, Database, Empty, HTML, HTML form, HTML form element, MySQL, PHP Function, Query, Submit-button, Table, Text-field
Posted by Shek on May 16, 2008 under PHP |
Editor’s note: In a login system, there are user names and passwords stored in the MySQL database. The passwords are normally stored as strings inside the database. To have a more security way to store the passwords in the database, it is better to store an encrypted version of the password, therefore only the password creator knows what the password is.
MD5 is the encryption technology I like to use because it is very easy to implement and it encrypts a string into a 32-character strings, for reference what MD5 really is, please check Wikipedia-MD5.
Read more of this article »
Tags: Button, Database, Encryption, HTML, HTML form, HTML form element, Insert, MD5, MySQL, Password, PHP Function, Query, Submit-button, Text-field
Posted by Shek on under PHP |
Editor’s note: To delete a table from the MySQL database is easy, all you have to do is to run a query to get it done. But in a content management system, you might like to build an user interface for the user to delete a table. Again a HTML form is a good idea for this. Here I have created an example to show how to delete table from MySQL database with HTML form and PHP.
Read more of this article »
Tags: Button, Database, Delete, HTML, HTML form, HTML form element, MySQL, PHP Function, Query, Submit-button, Text-field
Posted by Shek on May 15, 2008 under PHP |
Editor’s note: In some cases such as a company’s login system for example, the login names and passwords are stored in the MySQL database. But if a staff leaves the company and so his account has to be removed from the database. Therefore it is good to design a HTML form for the administrator to remove the record from the database. And here is the example.
Read more of this article »
Tags: Button, Database, Delete, HTML, HTML form, HTML form element, MySQL, PHP Function, Query, Submit-button, Text-field