• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Tuesday, July 31, 2012

CREATE DATABASE AND TABLE IN MYSQL


Hi …. Welcome again in my site… at We Are Knowledge.. 
In here you want getting many IT knowledge .. you can getting likely PHP, VB, HTML, MYSQL and other…

And now… I want giving you method for making “database” and “table” in MYSQL… This is very easy.. In manufacture “database” and “table” it you must having software or aplication “XAMPP”… and if you have it… Let’s check it…

Frist step you must open the XAMPP and trun on or start “mysql” you just click until word “start” be “stop”.. if it is open “Run” press windows + R… next write “cmd”.. >> Enter…

You must enter to folder or directories “xampp”. 
If you put instalitation in C:\program files\xampp…

Then you must write it

1. cd.. >> enter
2. cd.. >> enter
3. cd/program files/xampp/mysql/bin >> enter
4. mysql –u root >> enter

And ifit is… you can making “database”…

And syntax is : create database name_database;


If it is you can to making “table”

And syntax is :
Create table name_table;

Example :

1. Making database

Create database adsanse;


2. Making table

Create table adsanse(
Id int(9) primary key auto_increment,
Name varchar(200) not null,
Sex varchar(10),
Born date,
Adrress text
);


Logic ::

Primary key is address for different with other, this using for ‘id’ and should not be same
Auto_increment is value always incress though we not inputting.
Int to result variable integer value
Varchar to result variable character value
Date to result “date” yyyy – mm – dd
Text to result variable charcater and integer.. and unlimited….


Ok.. just it…
I hope you understand with this all…
Thanks for you and the readers….
If you not undestand please leaving the comment… and I want help you…
And if you like this article don’t forget to click button “like” “thumbs”….
Ok ok ok  See you later

Monday, July 30, 2012

METHOD POST IN PHP


Hi… welcome… in my page….

Still in PHP… yeah…

Now… I want to giving you about PHP and title discuss of “method POST in PHP”.. Yon know previous…???.. Method POST in PHP is command for go to other page or other “url”… Usually programmer using “button” for move or goto other url…

Ok.. direct in program…., I want making program using “checkbox”, “radio”. … ok check it….

You can copy this coding and paste in your notepad

First step :

<html>
<head> METHOD POST IN PHP <br> <br> <br>
<title> WE ARE KNOWLEDGE </title>
</head>
<body>
<form method = POST action = "20.php">
<?php
echo "<table border = 7>
<tr> <td> HARDWARE </td> <td>
<input type = radio name = r value = HARDISK> HARDISK  <br>
<input type = radio name = r value = DVD ROOM> DVD ROOM  <br>
<input type = radio name = r value = FLASH_DISK> FLASH DISK <br>
<input type = radio name = r value = MODEM> MODEM  <br>
<input type = radio name = r value = SOUND_CARD> SOUND CARD <br></td>
</tr>
<tr>
<td> SOFTWARE </td> <td>
<input type = checkbox name = 's[]' value = PHP> PHP <br>
<input type = checkbox name = 's[]' value = VB.NET> VB.NET <br>
<input type = checkbox name = 's[]' value = HTML> HTML <br>
<input type = checkbox name = 's[]' value = JAVASCRIPT> JAVASCRIPT <br>
<input type = checkbox name = 's[]' value = ORACLE> ORACLE <br> </td>
</tr>
<tr>
<td> </td> <td> <input type = submit value = SEND </td>
</tr>
</table>";
?>
</body>
</html>

Save with save as type = ”PHP”.

Second step :
Copy this coding and paste in your notepad


<?php
$a = count($_POST['s']);
echo $_POST[r]."<br>"."<br>";
for ($x = 0; $x < $a; $x++)
{
echo $_POST['s'][$x]."<br>";
}
?>


If it save with save as type = “PHP”.. DON’T forgt give name = “20.php”
………..
……….

And result:

METHOD POST IN PHP



Top of Form
HARDWARE
 HARDISK
 DVD ROOM
 FLASH DISK
 MODEM
 SOUND CARD 
SOFTWARE
 PHP
 VB.NET
 HTML
 JAVASCRIPT
 ORACLE 
<="" td="">


If you choice  flash disk, php, vb.net, oracle … and clcik “send’
Result is
FLASH_DISK

PHP
VB.NET
ORACLE


Ok.. just it.. I hope you understand with this all…
Thanks for you
Se you later..

Saturday, July 28, 2012

SELECT OPTION IN PHP

Hi.. welcome in my site… at “We Are Knowledge”… Many knowledge in here… you can getting IT knowledge in here, like as : PHP, HTML, VB, PASCAL, COBOL, and other…

But.., now I want giving you knowledge about “PHP” and discuss “OPTION IN PHP”…

You know “OPTION IN PHP … ? “

Define option in PHP is form that has been provided by “PHP” and function is saving many word or more than one word… and form drop down…

Ok we direct to program code…

Example 1 :

This is just choice one from one option
You can copy it… or you write your own in order to you can easier to understand..

<html>
<head> We Are Knowledge <br> <br>
<title> OPTION IN PHP </title>
</head>
<body>
<form method = "POST" action = "wak7.php">
<table border = "3" cellpadding = "1" cellspacing = "1" align = center>
<tr>
<td>
<select name = "INDONESIA_FC">
<option value = "">- select one -</option>
<option value = "sriwijaya">sriwijaya</option>
<option value = "persija">persija</option>
<option value = "persib">persib</option>
<option value = "arema">arema</option>
<option value = "persipura">persipura</option>
</select>
<br><br><br>
<input type = submit value = "SEND">
</table>
</form>
</body>
</html>

Next.. paste in your notepad and save with save as type “HTML”
And this file.php…

You can copy this

<?php
echo "Your Favorit FC in Indonesian is : ", $_POST[INDONESIA_FC];
?>

If it is.. save with save as type “PHP”…
DON’T FORGET… give name = “wak7.php”….

And result is :

We Are Knowledge


Top of Form
      




If you choice “persija” next press “send”… and result is

Your Favorit FC in Indonesian is : persija

In new tab ….!!!


Example 2 :

This using 2 (two) option…

You can copy this and paste in your notepad

<html>
<head> We Are Knowledge <br> <br>
<title> OPTION IN PHP </title>
</head>
<body>
<form method = "POST" action = "wak7.php">
<table border = "3" cellpadding = "1" cellspacing = "1" align = center>
<tr>
<td>
<select name = "I_F">
<option value = "">- select one -</option>
<option value = "GADO - GADO">GADO - GADO</option>
<option value = "KETOPRAK">KETOPRAK</option>
<option value = "GUDEG">GUDEG</option>
<option value = "EMPEK - EMPEK">EMPEK - EMPEK</option>
<option value = "NASI PADANG">NASI PADANG</option>
</select>
<br><br>
<select name = "I_G">
<option value = "">- select one -</option>
<option value = "PETAK UMPET">PETAK UMPET</option>
<option value = "KELERENG">KELERENG</option>
<option value = "EGRANG">EGRANG</option>
<option value = "ULAR NAGA">ULAR NAGA</option>
<option value = "BENTENG">BENTENG</option>
</select>
<br><br><br>
<input type = submit value = "SEND">
</table>
</form>
</body>
</html>

Save with save as type = “HTML”…

This for file.php

Copy this coding !!!!

<?php
echo "Your Favorit Indonesian food is : ", $_POST[I_F]."<BR>";
echo "Your Favorit Indonesian game is : ", $_POST[I_G];
?>

Next.. don’t FORGET give name = “wak7.php” … you must DO IT !!!...

And If it is  to result :

We Are Knowledge


Top of Form
      

      



If you choice “GUDEG” and “ULAR NAGA”.. then press “SEND” and to appear next tab… result is…

Your Favorit Indonesian food is : GUDEG
Your Favorit Indonesian game is : ULAR NAGA


Ok… just it…
I hope you understand with my tutorial…
Thanks for you…
See you later

Friday, July 27, 2012

CHECKBOX IN PHP


Hi… welcome again in my page… in here you want geetting many knowledge….

Now.. I want giving you knowledge about PHP and discuss about “CHECK BOX IN PHP”. You know that..? If you do noy know.. Let’s reading my article… Let’s check it…

In PHP to be found many FORM. And the FORM like as :
  • checkbox
  • Radio
  • Text
  • Submit
  • Reset
  • Password

In page I want giving you tutorial about SUBMIT and CHECKBOX in PHP.

Form checkbox is form which allows we can choice more than 1 (one) options.. Not likely type radio, we just can choice one from many options.. therefore this form type usually using for election more than 1 (one) option.

Example 1 :
you can copy this coding

<html>
<head> We Are Knowledge <br> <br>
<title> FORM IN PHP </title>
</head>
<body>
<form method = "POST" action = "wak.php">
<p align = center> Choice foods that you like <br> <br>
<table border = "3" cellspacing = "1" cellpadding = "1" align = "center">
<tr>
<td>
<input type = checkbox name = "say[]" value = "NASI GORENG">NASI GORENG <br>
<input type = checkbox name = "say[]" value = "NASI UDUK">NASI UDUK <br>
<input type = checkbox name = "say[]" value = "NASI RAMES">NASI RAMES <br>
<input type = checkbox name = "say[]" value = "NASI KEBULI">NASI KEBULI <br>
<input type = checkbox name = "say[]" value = "NASI PADANG">NASI PADANG
</td>
</tr>
<tr>
<td>
<input type = submit value = "CHOiCE">
</tr>
</table>
</body>
</html>

Next.. paste in your notepad..
Save with save as type = “HTML”..

If it is.. you must making file.php

You can copy this coding and paste in your notepad…

<?php
$a = count($_POST['say']);
for($x=0; $x<=$a - 1 ; $x++)
{
echo " food that you choose ", $_POST['say'][$x]."<br>";
}
?>

If it is you must save with save as type = “wak.php”.

And result is
We Are Knowledge


Top of Form
Choice foods that you like 
NASI GORENG
NASI UDUK
NASI RAMES
NASI KEBULI
NASI PADANG
Bottom of Form


If you choice nasi goreng nasi uduk nasi padang… to appear…

food that you choose NASI GORENG
food that you choose NASI UDUK
food that you choose NASI PADANG


Ok.. just it..
thanks for you…
don’t forget for came back….
See you later

Thursday, July 26, 2012

FORM RADIO IN PHP


Hi… welcome in my page at “We Are Knowledge”…

In here you want got many knowledge like “PHP”.. Yes… I want giving you knowledge about it with discuss “FORM RADIO IN PHP”.

Previous I was write article form about text and submit…
Maybe you do not know form in PHP,,, And this is FORM IN PHP :
  • Submit
  • Text
  • Radio
  • Check list
  • Password
  • Select


Ok direct to example… let’s do reading my article… have fun man…
Form type in PHP is form where we can only choice one option….

Example 1 :

you can copy this coding..

<html>
<head> We Are Knowledge <br> <br>
<title> FORM IN PHP </title>
</head>
<body>
<p align = center>please choice your hardware <br><br>
<form method = "POST" action = "wak.php">
<table border = "2" cellspacing = "1" cellpadding = "1" align = "center">
<tr>
<td>
<input type = radio name = "say" value = "PC COMPUTER">PC computer
<input type = radio name = "say" value = "NOTEBOOK">Notebook
<input type = radio name = "say" value = "LAPTOP">Laptop
<td>
</tr>
</table>
<p align = center>please choice your transport <br><br>
<table border = "2" cellspacing = "1" cellpadding = "1" align = "center">
<tr>
<td>
<input type = radio name = "say3" value = "PLANE">PC computer
<input type = radio name = "say3" value = "BUS">Bus
<input type = radio name = "say3" value = "TRAIN">Train
<input type = radio name = "say3" value = "SHIP">Ship
<td>
</tr>
</table>
<br> <br>
<input type = submit value ="SEND" name = "say2">
</body>
</html>


Next.. paste in your notepad with save as type = “HTML>

And making file.php

You can copy this coding

<?php
echo "You choice hardware is  : ", $_POST[say]."<br>";
echo "You choice transport is : ", $_POST[say3];
?>

Paste in your notepad..

DON’T forget save as type = “PHP” and giving name “wak.php>


And result is :


We Are Knowledge


please choice your hardware 
Top of Form
PC computer Notebook Laptop
please choice your transport 
PC computer Bus Train Ship




And if you choice notebook
AndBottom of Form
and train..

The result is :

You choice hardware is : NOTEBOOK
You choice transport is : TRAIN



Ok.. just it… I hope you understand with this tutorial…
Thanks for all…
See you later

Wednesday, July 25, 2012

FORM TEXT IN PHP


Hi.. welcome in my page at “We Are Knowledge”. You can getting many knowledge in here… If you look for IT knowledge about PHP.. This web page is right…

Now, I want giving you IT knowledge about “PHP” and the discuss is “FORM”. Yes FORM in PHP…

You will know… ??? Let’s read it…

FORM in PHP to be found :
  • Text
  • password
  • Submit
  • Reset
  • Check box
  • Check list


And in here I want discuss about form text and form submit.

In Form Submit more often use,, because form submit using for process.
And Define from form text is form which allows we can input word or sentence.

FORM in PHP is .. place for putting your syntax.
You must making 2 (two) file. And the file is “PHP” and “HTML”

Example : file.php and file.html

Example 1 :

you can copy this coding

<html>
<head> We Are Knowledge <br> <br>
<title> FORM IN PHP </title>
</head>
<body>
<form method = "POST" action = "wak.php">
<table border = "2" cellspacing = "1" cellpading = "1" align="center">
<tr>
<td>Input</td><td><input type = text name = "say"></td>
<tr>
<td></td><td><input type = submit name = "say2" value = "SEND">
</tr>
</table>
</body>
</html>


And paste in your notepad…
Save with save as type = “HTML”..
And you must making file.php

You can copy this coding

<?php
echo $_POST[say]
?>

And paste in your notepad…

DON’T forget.. save as type = ”PHP” and you must giving the name = “wak.php”

And result is :

We Are Knowledge 


Top of Form
Input
Bottom of Form



You can input name in form text and if you input "I LOVE PHP" like this

We Are Knowledge 


Top of Form
Input
Bottom of Form

And you press a button “SEND” and result is

I LOVE PHP

To appear in second windows…


Ok.. just for it…
Maybe you any question… please leave your questions in form comment…
Thanks for you.  And Thanks for visitors..
See you later.

Tuesday, July 24, 2012

STRING IN PHP


Hi… welcome again in my site in “We Are Knowledge”.

This site is site about IT knowledge… you can take many knowledge in here and you can getting learn in here.

Now, I want to giving you knowledge PHP about “STRING”. You know string in PHP. Define “string” is type of variable in PHP likely “integer, array, and other”.

Ih here I want giving you method, how to manipulation string ?.

Ok.. let’s reading my article..

COUNT THE NUMBER OF CHARACTER

You can copy this coding in your notepad

Example 1:

<?php
$a = "We Are Knowledge";
$b = strlen($a);
echo "number of character is : ", $b;
?>

Next, you must saving with “save as type = PHP”.

And result is :
number of character is : 16


COMPARING 2 (TWO) STRING)

You can copy this coding in your notepad

Example 2:

<?php
$a = "we are knowledge";
$b = "we are knowledge";
$c = strcmp($a, $b);
if ($c != 1)
{
echo "Your word is True";
}
else
{
echo "your word is false";
}
?>

Next, you must saving with “save as type = PHP”.

And result is :
Your word is True

Try you change “$b” be “$b = "we are ";”

And result is :
Your word is False


CAPITALIZE STRING

capitalize string is  command for making all letter be capital
You can copy this coding in your notepad

Example 3:

<?php
$a = "we are knowledge";
$b = strtoupper($a);
echo "before using strtoupper ", $a."<br>";
echo "after  using strtoupper ", $b;
?>

Next, you must saving with “save as type = PHP”.

And result is :

before using strtoupper we are knowledge
after using strtoupper WE ARE KNOWLEDGE


LOWERCASE

You can copy this coding in your notepad

<?php
$a = "WE ARE KNOWLEDGE";
$b = strtolower($a);
echo "before using strtolower ", $a."<br>";
echo "after  using strtolower ", $b;
?>

Next, you must saving with “save as type = PHP”.

And result is :

before using strtolower WE ARE KNOWLEDGE
after using strtolower we are knowledge


Ok.. just it…
I hope you understand with my tutorial…
Thanks for you..
See you later

Monday, July 23, 2012

LOOPING IN PHP


Hi.. welcome again in my site at “We Are Knowledge”. Now I want giving you knowledge programming language PHP about ”LOOPING IN PHP”. Previous we was discuss about “CONDITION IN PHP”  using IF and ELSE.

Define from LOOPING is statement continues working until condition fullfiled. For fullfil The program can icrease variable or decrease variable.

LOOPING IN PHP be 3 (three) :
  • FOR
  • WHILE
  • DO WHILE


FOR

Syntax :
for (initial value; limit value; operator increment / decrement)
{
statements to be in the process
}


Ok.. direct to coding. Let’s do it.

Example 1 :
You can copy this coding :

<?php
for ($a = 0; $a <= 100; $a++)
{
echo $a."<br>";
}
?>


Result is 1
2
3
4
100


Next, paste in your notepad. And sava sa type “PHP”

Logic:
$a = 0           >> the initial variable “a” is 0
$a <= 100   >> this is requirement until value a = 100
$a++             >> for increase a value “a” 


Example 2:

You can too copy and paste in your notepad

<?php
for ($a = 0; $a <= 10; $a++)
{
echo "<font size = $a> $a</font>"."<br>";
}
?>

And don’t forget, Save as type “PHP”.

To result :
1
2
3
10

Note : but with size different.



WHILE

Syntax
The initial value
do
{
statements;
operator decrement / increment;
}
While (limit repetition)


Example 3:

You can copy this coding…

<?php
$a = 1;
do
{
echo $a.'<br>';
$a++;
}
while ($a <= 100)
?>

If  it is paste in your notepad and save with save as type “PHP”

And result is
1
2
3
4
100


Logic

$a = 1                          >>  the initial variable a is “1”
Do                                 >> syntax of while. You must write it
echo $a.'<br>'        >> for print. Print same with echo.
$a++;                          >> for increase variable a
while ($a <= 100)  >> program to continues while variable more than “100”


Ok.. just it…
I hope you understanding with my tutorial…
Thanks was visit in my page…
See you later.