Introduction, Variable, Structure [download]
Materi Array untuk Web Programming Fundamental [download]
I wrote the post about how to connect JSP applications and your Database, and in this post I’ll write the post that has same purpose but in the different way. we’ll connect the database via JSTL.
The basic structure of Decision-Making in PHP programming Language and JSP Programming language is exactly the same. ‘Decision-Making in JSP also use IF…ELSE and SWITCH…CASE statements.
IF … ELSE statement
Most of decision-making structure refer to this statement. This statement is suitable for small case (one/two condition(s)) of decision making until big case decision-making (nested if/more than 2 conditions).
Structure : Continue reading
I miss this blog so much, another work loads. some applications to make, teaching schedule, and family’s event. And in this post I’ll show you how to process your data from form you made.
Before read the following tutorial, you should have basic knowledge about HTML, and Basic JSP.(about what to do with your computer before start to code in JSP)
At some point it feels familiar, and it will get more like family now. so come on.
<input name=address id=address type=text /> //text box in HTML
String addr; //declare variable addr as String
addr = request.getParameter("address"); // assign the form variable address into variable addr
out.println(addr); //print the value of variable addr
<input name=frprice id=frprice type=text />
int price = Integer.parseInt(request.getParameter("frprice")); //define price variable as integer and convert the value of form variable frprice from string into integer.
count = price - (price * 5%);
syntax above will convert string data from form variable named frprice into Integer and assign it into variable named price.
Integer.parseInt(variable_name) in charge of converting string variable into integer.
I did tell you before that I am a PHP Girl rather than a Java woman. And this is love of my life.. 😀 they said we are soulmate, that’s why I fell for him since the first time I tried to spell W-E-B. I am happy to talk about you, PHP. I do… I really do. So don’t doubt me and my feeling for you is real. As real as my existence on the earth… muahahahahahahaaa
PHP stands for Hypertext Pre Processor (don’t ask me where the first P goes to, they never tell me anything) is a server side scripting language where the script executed in the server side and send the output as the html document on the user’s computers. The good things about web based program is you can embed your programming language into your HTML tags.
So.. why PHP??? When there is lots of programming language scattered on the world of internet??
Table comes in various styles, and the striped style is the most popular among them, normally when you make the table with pure HTML’s tags you could write the style down with CSS for each row. The idea is how to make the row’s background change dynamically according to the row. the odd rows has a different background color with the even one. Because we gonna make it from PHP code.
to make table above, first we have to define the color you’ll use. for example you will make a gray-white strip. so for gray we will use #EEEEEE color’s code and for white one, we just need to write ‘white’ or you can use code ‘#FFFFFF’. As we both know that table has both odd and even rows, so the plan is to make the odd rows has white background and the even one has the gray background. well, how do we know which one is even and which one is odd???? good question because we all know that PHP has modulus arithmetic operator ‘%’ .
the next step is Continue reading