Run different XML scenarios by typing in different URL ending with PHP

Posted by Shek on May 9, 2011 under PHP, XML | Be the First to Comment

In this post, I am going to show how to run different xml file (scenario) for the webpage by typing in different URL ending, example: www.phpsuperblog.com/index.php?scenarioA.xml, it will run the scenarioA.xml file’s scenario.

Read more of this article »

Generate random password with PHP rand function

Posted by Shek on May 8, 2011 under PHP | Be the First to Comment

In system designing, there are many cases which requires user to login in order to access some restricted areas. And so, we might need to generate an initial password for the user. Here I am going to show you how to generate random passwords with integers

Read more of this article »

Using XML elements as HTML form drop down menu items with PHP

Posted by Shek on April 30, 2011 under PHP, XML | Read the First Comment

In my previous post, I have mentioned about using MySQL data as drop down menu items. Here in this post, I am going to show how to use XML elements as HTML form drop down menu items, by doing so, we could use the XML file as a configuration file.

Read more of this article »

Insert all array elements into MySQL database table’s different fields

Posted by Shek on December 28, 2008 under PHP | Read the First Comment

Array is a good way to store many elements, in some operations you might like to store all of the array elements into different row of a table in a MySQL database. To store into different row, we can use a for loop to go through each elements and run a query to insert them 1 by 1. This example, I go show you to insert into different fields.
Read more of this article »

Join all elements of an array together and become a string

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

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 »

Refresh page with PHP function header()

Posted by Shek on December 25, 2008 under PHP | Be the First to Comment

Editor’s note: In my past post Redirect page using PHP function header(), I talked about how to redirect page with header() function. To refresh a page, by using the same function and redirect to the page to itself, then it has the refresh effect.

Read more of this article »

Page 1 of 612345...Last »