Posted by Shek on June 10, 2009 under PHP |
Editor’s note: In some cases, when you have forgotten to preset the MySQL database table encoding to UTF8 after the creation of the database but later you need to insert some UTF8 text such as Chinese or other Asian languages, here is how you could do with PHP to change the encoding of the MySQL database table.
Read more of this article »
Posted by Shek on December 28, 2008 under PHP |
There are many elements in an array. In some operations, you might like to join all the elements within an array to become a string and use the string for other operation, how can this be done?? There is a function of PHP can do the job, which is implode( ). Let me show how to do so:
Read more of this article »
Posted by Shek on November 23, 2008 under PHP |
Editor’s note: I mentioned in my previous post
Display data from MySQL with PHP which I demonstrated how to display the data of a row within a table, now I want to demonstrate how to display all field names (column names) of a table within a MySQL database.
Read more of this article »
Posted by Shek on November 16, 2008 under PHP |
To find and print out the number of column (field) of a table in MySQL database, we have to use a php function “mysql_num_fields()” to get the number and to use a variable to store the result, here I have created an example to demonstrate how to do so:
Read more of this article »
Posted by Shek on July 8, 2008 under HTML |
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 »
Posted by Shek on June 30, 2008 under PHP |
Editor’s note: In some cases, you might like to check how many records in the MySQL database which matches the query you entered. Case such as a login system where you want to check if there is a record matches the user name and the password inputted , here is an example
Read more of this article »