Submit HTML form with radio button

Posted by Shek on October 22, 2010 under HTML | Be the First to Comment

Editor’s note: HTML form normally submitted with a button, however in some cases when the user wants to have an action (submit some data to another page) by clicking a radio button, a little javascript would do the job, and here is an example:

Read more of this article »

HTML form – submit to a new window

Posted by Shek on July 8, 2008 under HTML | Be the First to Comment

We use HTML form a lot for the user to input data and process those data from a PHP file, but with the standard code of a HTML form:

Read more of this article »

Check ip address of host or website with PHP function and HTML form

Posted by Shek on May 26, 2008 under PHP | Be the First to Comment

Editor’s note: There is a function in PHP to check the IP address of a host. It is called “gethostbyname()“. We could use it to check the IP address of a website. Steps are very simple: Put the website address into the function, for example: gethostbyname(www.phpsuperblog.com); and print the result out and then the IP address of the website would appear.
Read more of this article »

Create a HTML form with PHP for loop and table

Posted by Shek on May 18, 2008 under PHP | 2 Comments to Read

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 »

Empty a table in MySQL database with HTML form and PHP

Posted by Shek on under PHP | Be the First to Comment

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 »

MD5 – insert an encrypted string or password to the MySQL database with HTML form and PHP

Posted by Shek on May 16, 2008 under PHP | 2 Comments to Read

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 »

Page 1 of 212