Rabu, 21 Agustus 2013

Make PHP using Variable

In this thread i want to share about make Biodata with collaboration PHP and
HTML script with using Variable technique.

i'm ever share before about using Variable on PHP. so, if you ever read more
easy for make it:

This slice of screenshot for the Script:

On the top of script we will found the PHP script, on there i take the Defini tion for the Variable. Under the PHP script it's HTML script for outputing, and inside table tag we include PHP script for make the Variable works. this Biodata looks like:

PHP Variable String and Number

PHP has 8 type data of Variable: Boolean (True - False), Integer, Floating
point(decimal), String, Array, Object, Resource, and Null.

In this page i want to explain about using Variable with String in PHP:

There some rule for writing Variable in PHP:

- Writing PHP variable begins with '$' (dollar) character.
- When it included with 2 words, dont input  between both, you can use '_'
(underscore) or combine that 2 words.
- The Character must letter or underscore after '$', cant use Number or Symbol.
- Variable in PHP is Case-sensitive.

Example: $variableName
         $variable_Name
         $variableName with $Variablename is Different.

When we want to fill and show the values of a Variable where the type data is
"String", it need ';' for ending. And if we want include words inside the
command viewer we must use " (double quote).

Example: echo $variableName;
         print $variableName;
         echo "Hi, $variableName";

Here Example for writing Variable with String type data:

< ?php
$fullName = " Bagus Rizaldy S";
echo "My Full Name is$fullName";
echo "My Full Name is".$fullName";
?>

the output will be appear like this:

so, the explanation is we call the contents of the Variable, when we want to combine the Variable and String we must put "." between it. And then try to Number or Numeric: < ?php $number1 = 2; $number2 = "3"; $number3 = "4four"; echo "$number1*$number2"; echo $number1*$number2; echo $number1+$number3; ?> the output will be appear like this:
so, the explanation is see on first output it appear 2*3, why it is not calculate? becuse it use quotes so it detected as string, only appearing and not calculate it, so if you want to make calculate Number or Numerical dont put any quotes like at operaion number 2 when the output 6, so if we didnt put qoutes the letter wont to detect like variable $number3.

Jumat, 02 Agustus 2013

Open file in internal browser at phpDesigner8


Tutorial PHP at phpDesigner8
In this page i'll share how to open .php file in internal
browser from phpDesigner8 software.

1. Open your phpDesigner and Project --> Project Manager

2. And then will approach 'Project Manager' click 'New' fill your 'Project Title:' and click 'Next'
3. After that we need to fill our 'Project Root Folder' fill the destination of folder and click 'Next'
4. we done about 'Project folder setting' and then we go to localhost tab, fill your localhost,local path, and your localhot port then click 'Ok'
5. and last steps, open your php project, click 'Run' and this project will appear on internal browser.

Kamis, 01 Agustus 2013

Open File with 'Shift+F6' to External Browser at NetBeansIDE


Tutorial PHP at NetBeansIDE
In this page i'll share how to open .php file with software NetBeansIDE
and use 'Shift+F6' open files to External browser(im using Firefox)

1. Open your NetBeansIDE and 'New Project...'. On tab steps '1. Choose Project'
   categories 'PHP' select Project and hit 'Next'

2. Now tab 'Name and Location' fill the Sources Folder with file directory and hit 'Finish'
3. File directory opened, and Properties
4. On tab Categories choose 'Run Configuration' look at 'Project URL' change the address localhost port if you change it and hit 'Ok'
5. change you External browser opener: Tools --> Options
6. Open subProject choose file and hit 'Shift+F6' and look at your browser the file opened!

Tutorial Change Apache Port


How to change Apache Port
If it can't to running we must change our Apache Port to 24(for my example,
whatever you want to change the port) for one reason, for example because it
clashed with IIS(Internet Information Service)

1. go to your xampp directory: (C:\xampp\apache\conf)

2. search file named: "httpd.conf" and open to edit
3. search "Listen 80" (default)
4. and change only Listen 80 what ever you want for my example i change it to Listen 24
5. save it, and Restart your Apache server 6. Done!