Gathered words from an unknown geek. Based on observations and experiences, words
are born. Presented in forms of poems, essays and codes.
A silent lad transformed into a talkative chap in this hidden World Of Mine.
[Java + Struts 2 + Log4j]: Simple Multi Selections Checkbox
Differ from the usual, this tutorial will be about Java and its related frameworks, i.e Struts 2 and Log4j. I’ve been searching over the internet for something similar, but failed. Hence I have to explore myself. Finally, here it is, I’m sharing it with rest of the world.
The most important component here is Java and Struts 2, log4j is only for logging purpose, you may choose to use System.out.print() as well. Let’s begin.
We start off by configuring the file struts.xml. Add the following actions inside the package:
-
-
<action name="checkBoxView" class="com.mohdrashidi.blog.sources.Checkbox">
-
<result name="input">/jsp/checkBox.jsp</result>
-
<result>/jsp/checkBox.jsp</result>
-
</action>
-
Tags: checkbox, java, log4j, struts 2
[PHP 5 + XML]: XML Login
A simple tutorial to show how PHP and XML can be use to store user info. For this tutorial, the main purpose is performing login action.
We begin by creating the xml file: (filename: login.xml)
-
-
<?xml version="1.0" encoding="ISO-8859-1"?>
-
-
<users>
-
-
<username>SHiDi</username>
-
<password>c822c1b63853ed273b89687ac505f9fa</password>
-
<fullname>Mohd Rashidi Bin Mohd Zin</fullname>
-
<active>1</active>
-
-
<username>John</username>
-
<password>0659c7992e268962384eb17fafe88364</password>
-
<fullname>John Doe III</fullname>
-
<active>0</active>
-
-
</users>
-
As you can see, this file stores all users information. Password stored are hashed with md5.
Tags: login, php, tutorial, xml
[PHP + MySQL + Javascript]: Dynamic AJAX Form
A simple tutorial on how to create a dynamic AJAX form. As usual, for this tutorial, I’ll be using jQuery, a javascript framework. Other components will be used here are PHP and MySQL, not to forget a little of CSS.
Before we start with the programming part, lets create a table with the following SQL:
-
CREATE TABLE IF NOT EXISTS `new_users` (
-
`users` varchar(60) NOT NULL
-
);
Tags: ajax, dynamic form, javascript, jquery, mysql, php






