Archive for November 2013

AJAX file upload

AJAX file upload example.
Tools used
JQuery - jquery-1.7.1.min.js
ajaxupload.js - You can find that file here. https://github.com/valums/ajax-upload

ajaxupload.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AJAX upload - codesstore.blogspot.com</title>

<script type="text/javascript" src="javascript/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="javascript/ajaxupload.js"></script>

</head>
<body>

<img name="profile_image" id="profile_image" alt="picture" src="" width="235" height="250" /> <br />
<input type="button" value="Upload Image" id="picture" class="picture" />
<div class="uploading"></div>
<input type="hidden" name="photo_file" id="photo_file" />



<script type="text/javascript">
<!--
new AjaxUpload('#picture', {
action: 'ajaxupload_backend.php',
name: 'file',
autoSubmit: true,
responseType: 'json',
onSubmit: function(file, extension) {
$('.uploading').html('<img src="images/loading.gif" class="loading" />');
$('#picture').attr('disabled', true);
},
onComplete: function(file, json) {
$('#picture').attr('disabled', false);

$('.error').remove();

if (json['success']) {

$('#profile_image').attr('src', json['file']);
$('#photo_file').val(json['photo_file']);
}

if (json['error']) {
alert(json['error']);
}

$('.loading').remove();
}
});
//-->
</script>


</body>
</html>


ajaxupload_backend.php

Here is the backend file. Added some size and file type validations.Uploaded files will store the UPLOAD_DIR dierectory.
<?php

define('UPLOAD_DIR', 'C:/wamp/www/ajaxupload/uploads/');
define('UPLOAD_HTTP', 'http://localhost/ajaxupload/uploads/');

        $json = array();
      
        if (!empty($_FILES['file']['name'])) {
          

            $filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($_FILES['file']['name'], ENT_QUOTES, 'UTF-8')));
    
            if($_FILES['file']['size'] > (1000*1024)){
                  $json['error'] = "File too large. Max file size : 1MB";
              }
                
              list($width, $height, $type, $attr) = getimagesize($_FILES['file']['tmp_name']);
            
              $dimension_eror='';
            
              $min_width = 800;
              $min_height = 600;
            
            if($width < $min_width ){
                  $dimension_eror .= 'Image width is too small';
              }
              if($height < $min_height ){
                  $dimension_eror .= 'Image height is too small';
              }
              if($width < $min_width && $height < $min_height){
                  $dimension_eror = 'Image width and height too small';
              }  
              if($dimension_eror != ''){
                  $json['error'] = $dimension_eror;
              }
                          
            $allowed = array('JPG','JPEG','jpg','jpeg');
                          
            if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) {
                $json['error'] = 'Allow file type: JPG';
               }
                 
            if ($_FILES['file']['error'] != UPLOAD_ERR_OK) {
                $json['error'] = $_FILES['file']['error'];
            }
          
        } else {
            $json['error'] = 'Upload Failed';
        }
      
      
      
        if (!$json) {
          
            if (is_uploaded_file($_FILES['file']['tmp_name']) && file_exists($_FILES['file']['tmp_name'])) {
                $file =  time().generateRandomString().basename($filename);

                move_uploaded_file($_FILES['file']['tmp_name'], UPLOAD_DIR . $file);
                              
              
                $json['file'] =UPLOAD_HTTP. $file;
                $json['photo_file'] = $file;
  
            }
                      
            $json['success'] = 'Successfuly uploaded';
        }  

        echo json_encode($json);      
  

        function generateRandomString($length = 6){
          
            $string = "";
            $possibleCharactors = "2346789abcdfghjkmnpqrtvwxyzABCDEFGHJKLMNPQRTUVWYZ";
            $maxlength = strlen($possibleCharactors);
  
            if ($length > $maxlength) {
                $length = $maxlength;
            }
  
            $i = 0;
            while ($i < $length) {
  
                $char = substr($possibleCharactors, mt_rand(0, $maxlength-1), 1);
  
                if (!strstr($string, $char)) {
                    $string .= $char;
                    $i++;
                }
  
            }
            return $string;
        }
      

?>
Directory structure in Eclipse
AJAX upload project folder structure

web usabilty

Usability has it’s own importance in a website.Some dos and don’t s to achieve a good usability are as follows.

  • Do:
    • Use ALT tags for all graphics, especially navigation graphics.
    • Use black text on white background whenever possible for optimal legibility.
    • Use either plain-color backgrounds or extremely subtle background patterns.
    • Make sure text is in a printable color (not white).
    • Place navigation in a consistent location on each page of your website.
    • Use a familiar location for navigation bars.
    • Keep the design from scrolling horizontally.
    • Use one axis of symmetry for centered text on a page.
    • Encourage scrolling by splitting an image at the fold.
  • Don’t:
    • Allow ALT tags to get clipped (especially an issue for small, fixed width images).
    • Display static text in blue or underlined.
    • Use boldface or ALL CAPS for long pieces of text. These slow down reading.
    • Leave too much white space–reduces scannability.
    • Make the user scroll to find critical information, especially transaction buttons and navigation links.
    • Use horizontal rules to separate chunks of content.
    • Alternate too frequently between centered text and left-aligned text. Most text should be left-aligned.
    • Fix pages at larger than 800 x 600 pixels. Larger pages may force users to scroll horizontally.

ThinkUp – Open-source app that stores your social network activity in a database

ThinkUp is a free, open source web application that captures your posts, tweets, replies, retweets, friends, followers and links on social networks like Twitter and Facebook.
 You can store your social activity in a database that you control, making it easy to search, sort, analyze, publish and display activity from your network. All you need is a web server that can run a PHP application.

Homepage: http://thinkupapp.com/

Comments in PHP

PHP supports 'C', 'C++' and Unix shell-style (Perl style) comments. For example:

<?php

echo 'This is a test'; // This is a one-line c++ style comment

/* This is a multi line comment

yet another line of comment */

echo 'This is yet another test';

echo 'One Final Test'; # This is a one-line shell-style comment

?>

The "one-line" comment styles only comment to the end of the line or the current block of PHP code, whichever comes first. This means that HTML code after // ... ?> or # ... ?> WILL be printed: ?> breaks out of PHP mode and returns to HTML mode, and // or # cannot influence that. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. However, the </script> tag doesn't break out of PHP mode in a one-line comment.

<h1>This is an <?php # echo 'simple';?> example.</h1>

<p>The header above will say 'This is an example'.</p>

'C' style comments end at the first */ encountered. Make sure you don't nest 'C' style comments. It is easy to make this mistake if you are trying to comment out a large block of code.

<?php  

/*

echo 'This is a test'; /* This comment will cause a problem */

*/

?>

All About Our PHP Tutorials

Your PHP learning journey starts from here. We provide you tons of PHP tutorials with examples and videos. Also we provide some PHP projects that helps you to understand real life PHP application. Don't worry because our tutorials helps you from the scratch. Anyone can develop his/her PHP skill professionally from our tutorials because we provide PHP tutorials with example as well as PHP video tutorials.You can hone your skill on PHP web development from start to finish by just following our PHP lessons.


We divide our all PHP tutorials in many parts.Here are different parts of our PHP tutorials
  • PHP Basic
  • PHP advanced
  • Object-Oriented PHP
  • Database and PHP 
  • Developing PHP projects
  • PHP framework 
  • PHP video and pdf tutorials
Here are some suggestions for you that explain how to use our website. First of all we think that you want to learn PHP from beginners to advanced level. To do this at first try our PHP basic tutorials that helps to understand PHP basic and also helps you how to install PHP, how to write first PHP script and some PHP basic features. Then you can go forth with advanced PHP tutorials that helps you to enter into PHP real life problems. After completing this tutorials I suggests you just go to our PHP projects tutorial. Try to understand each project and then try to write PHP code in your hands.

If you have special passion on PHP than start your learning from our Object-Oriented PHP tutorials. Our Object-Oriented PHP tutorials are easy to understand and we try to explain all tutorials with example. Now it is time to turn your understanding with PHP framework. PHP framework gives you some flexibility to write large code with secured way. We think our PHP framework tutorials will helps you very much. Oh, it is happy news for you that we also provide PHP video tutorials for our every lessons. So lets start your PHP journey from now.

                                           Your first PHP tutorial

If you face any problems and think that some tutorial needs to be updated. Just make your comments or send us an email webdevelopers24@gmail.com, we appreciate your contribution.

Using echo

Echo allowed gives more than one string as parameter. Using some parameters are going to more faster than blending some variables into a parameter.

$a = ‘Hello’;
$b = ‘Word’;
echo ‘Say ‘ .$a. ‘ to ‘ .$b’;
//more faster
echo ‘Say ‘ , $a, ‘ to ‘, $b’;

How to get Latitude/Longitude from an address (or Geocoding ) using PHP

$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address=573/1,+Jangli+Maharaj+Road,+Deccan+Gymkhana,+Pune,+Maharashtra,+India&sensor=false');

$output= json_decode($geocode);

$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;



The line above makes a request to Google maps API. Passes the address, and receives the response in JSON format.

The URL has following options

http://maps.google.com/maps/api/geocode/output?parameters



For more details about parameters check out the Google’s geocoding documentation.

modify timestamp in php

<?php

$time=time();

echo 'today date is '.date('d : m : y',$time).'<br>'.'today time is '.date('H:i:s',$time).'<br>';
echo 'today date is '.date('D : M : Y',$time).'<br>'.'today time is '.date('h:i:s',$time).'<br>';

?>

output :
today date is 18 : 07 : 12
today time is 17:35:10
today date is Wed : Jul : 2012
today time is 05:35:10

note :
for every refresh of the browser ( after a second ) the seconds are changing 

Copyright Policy

If you want to link content from Free Web Scripts you are most welcome but before that please read our copyright policy :

1) Before linking the content first contact us.

2) If you get permission your can post a short paragraph with content in quotes. Copy quoted material exactly in your blog,forum,website etc.

3) You cannot copy the full article,only a short paragraph with 5-6 lines is allowed.

4) You need to clearly highlight the fact that the content was derived from Free Web Scripts.You must give credits to Free Web Scripts and paste the exact URL where the quote is from.

5) And at last send us your article link.

Note : Let us make it very clear that we take plagiarism very seriously.We will take the following actions if we find any website republishing our content without our permission.

* Get the site banned from Google and other Search Engines
* Getting Google or Yahoo Ads Down from the website
* Legal Action - We will not hesitate to file a formal complaint

Adding CURL extension to PHP 5.3.5


Today I was implementing Facebook authentication and downloaded FB PHP SDK and encountered a first issue. CURL extension was not enabled in WAMP.  Googled around and found several answers and followed every steps suggested and still it was not working. I ended up downloading php_curl.dll and curl package. php_curl.dll comes with PHP 5.3.5 it is in ext dir and libcurl.dll is not required for PHP 5.3.5. So if you have php 5.3.5 do not waste time downloading it.

I would suggest follow these steps for php version 5.3.5 and above.
 
1. Write a simple php program as shown below.

<?php

phpinfo()

?>

2. Run this in a browser and search for "CURL" if not found then follow the steps below.

3. Run this in a browser and find out the location of php.ini file.  This is important step which is missing.
    php.ini file exists in bin\php\php5.3.5\ directory also. So it is important to know which php.ini file
    is used.

    D:\wamp\bin\apache\Apache2.2.17\bin\php.ini 

   Edit this file and uncomment line (delete first character ";" ) "extension=php_curl.dll" from above file.

3. If just uncommenting  above line does not work then copy libeay32.dll and ssleay32.dll to C:\windows\system32\ directory.





php home

The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases.
PHP is basically used for developing web based software applications. 
This tutorial helps you to build your base with PHP. 
You can practice PHP online using compileonline.com
Audience:
This tutorial is designed for PHP programmers who are completely unaware of PHP concepts but they have basic understanding on computer programming.
Prerequisites:
Before proceeding with this tutorial you should have at least basic understanding of computer programming, Internet, Database, and MySQL etc is very helpful.




Teknik Debugging Script PHP + MySQL


Nah… berikut ini, saya akan coba paparkan tips bagaimana teknik melacak kesalahan atau istilah kerennya dalam programming adalah ‘debugging’ pada script PHP yang diintegrasikan dengan MySQL.

Untuk mempermudah penjelasan, saya akan coba tuangkan ke dalam studi kasus. Studi kasusnya lagi-lagi terkait dengan data mahasiswa.


Misalkan kita memiliki tabel untuk menyimpan data mahasiswa seperti berikut ini:

CREATE TABLE mhs (
  nim varchar(10),
  namamhs varchar(30),
  alamat text,
  sex varchar(10),
  PRIMARY KEY  (nim)
)
Perhatikan penulisan nama tabel dan field-fieldnya. Di sini saya sengaja menggunakan huruf kecil semua dalam menuliskan nama tabel maupun nama fieldnya. Ingat baik-baik ya !

Selanjutnya misalkan data yang tersimpan dalam tabel di atas adalah seperti di bawah ini

INSERT INTO mhs VALUES ('M0197001', 'ROSIHAN ARI YUANA', 'COLOMADU', 'L');
INSERT INTO mhs VALUES ('M0197002', 'DWI AMALIA FITRIANI', 'KUDUS', 'P');
INSERT INTO mhs VALUES ('M0197003', 'FAZA FAUZAN KH.', 'COLOMADU', 'L');
INSERT INTO mhs VALUES ('M0197004', 'NADA HASANAH', 'COLOMADU', 'P');
INSERT INTO mhs VALUES ('M0197005', 'MUH. AHSANI TAQWIM', 'COLOMADU', 'L');
Nah… selanjutnya misalkan kita punya script PHP untuk menampilkan semua data mahasiswa di atas ke dalam halaman web.

<?php

// koneksi ke mysql
mysql_connect("dbhost", "dbuser", "dbpass");
mysql_select_db("dbname");

// query SQL untuk menampilkan semua data mhs
$query = "SELECT * FROM mahasiswa";
$hasil = mysql_query($query);

// menampilkan hasil query ke dalam bentuk tabel
echo "<table border='1'>";
echo "<tr><td>NIM</td><td>Nama Mhs</td><td>Alamat</td><td>Jenis Kelamin</td></tr>";
while ($data = mysql_fetch_array($hasil))
{
  echo "<tr><td>".$data['Nim']."</td><td>".$data['namamhs']."</td><td>".$data['alamat']."</td><td>".$data['sex']."</td></tr>";
}
echo "</table>";
?>
Setelah script di atas Anda jalankan, mungkin Anda akan menjumpai error berbunyi seperti ini:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘root’@'localhost’ (using password: YES) in F:\mhs.php on line 4

Maksud dari error di atas adalah koneksi ke mysql dengan menggunakan user dengan nama ‘root’ gagal dilakukan. Nah.. untuk mengatasinya: coba cek apakah nama usernya benar, atau mungkin passwordnya yang salah.

OK… andaikan setelah username dan password untuk koneksinya diperbaiki dengan benar. Selanjutnya script bisa dijalankan kembali. Setelah dijalankan mungkin muncul error seperti di bawah ini

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in F:\mhs.php on line 14

Error tersebut muncul dikarenakan penulisan query SQL yang salah atau tidak memenenuhi aturan yang benar. Pada script di atas, query SQL yang digunakan adalah:

SELECT * FROM mahasiswa
Dalam kasus ini tentu kita langsung bisa menemukan kesalahan dari query SQL tersebut, yaitu penulisan nama tabel yang salah. Nama tabel seharusnya ‘mhs’ (dalam query boleh ditulis dalam huruf besar semua, atau campuran besar kecil).

Namun.. bagaimana bila query SQL nya panjang dan kita sudah yakin bahwa query yang kita buat ini adalah betul? He..3x jangan sok yakin dulu. Komputer tidak akan pernah berkhianat pada programmer. Memang.. query yang dijalankan dalam script PHP tidak akan terlihat kesalahannya. Untuk melihat kesalahan querynya, satu-satunya cara adalah menjalankan query tersebut ke dalam phpMyAdmin atau Navicat.

Trus.. langkahnya bagaimana? Langkahnya adalah tampilkan query SQL yang akan dijalankan ke dalam halaman web, dengan cara meng-echo-kan querynya (perhatikan perintah echo $query; pada baris ke-9 berikut ini)

<?php

// koneksi ke mysql
mysql_connect("dbhost", "dbuser", "dbpass");
mysql_select_db("dbname");

// query SQL untuk menampilkan semua data mhs
$query = "SELECT * FROM mahasiswa";
echo $query;
$hasil = mysql_query($query);

// menampilkan hasil query ke dalam bentuk tabel
echo "<table border='1'>";
echo "<tr><td>NIM</td><td>Nama Mhs</td><td>Alamat</td><td>Jenis Kelamin</td></tr>";
while ($data = mysql_fetch_array($hasil))
{
  echo "<tr><td>".$data['Nim']."</td><td>".$data['namamhs']."</td><td>".$data['alamat']."</td><td>".$data['sex']."</td></tr>";
}
echo "</table>";
?>
Nah… bila script di atas dijalankan, maka querynya akan ditampilkan ke browser. Trus.. copy lah query yang tampil tersebut, lalu jalankan di phpMyAdmin. Bila query tersebut salah, maka akan muncul pesan kesalahan. Kemudian barulah Anda perbaiki querynya.

OK… setelah diperbaiki querynya, maka akan diperoleh script berikut ini

<?php

// koneksi ke mysql
mysql_connect("dbhost", "dbuser", "dbpass");
mysql_select_db("dbname");

// query SQL untuk menampilkan semua data mhs
$query = "SELECT * FROM mhs";
$hasil = mysql_query($query);

// menampilkan hasil query ke dalam bentuk tabel
echo "<table border='1'>";
echo "<tr><td>NIM</td><td>Nama Mhs</td><td>Alamat</td><td>Jenis Kelamin</td></tr>";
while ($data = mysql_fetch_array($hasil))
{
  echo "<tr><td>".$data['Nim']."</td><td>".$data['namamhs']."</td><td>".$data['alamat']."</td><td>".$data['sex']."</td></tr>";
}
echo "</table>";
?>
Setelah diperbaiki dan dijalankan kembali scriptnya, maka error tidak akan lagi muncul, dan muncul beberapa data sebagaimana tampak pada gambar di bawah ini



But…. lho kok data NIM nya tidak muncul? Waduh… kenapa ini, padahal data yang lain muncul? Nah… ini disebabkan karena penulisan array yang salah terkait dengan nama fieldnya.

Perhatikan script di atas. Untuk menampilkan data pada field ‘nim’, kita menggunakan perintah $data['Nim'] (menggunakan huruf N besar). Padahal pada tabel yang kita buat di atas menggunakan huruf N kecil (‘nim’). Hal inilah yang menyebabkan permasalahannya.

Apabila Anda menggunakan mysql_fetch_array() untuk membaca record hasil query, maka pastikan nama elemen arraynya sama dengan nama fieldnya, baik dalam penulisan nya maupun besar kecilnya huruf harus sama.

Setelah diperbaiki, maka beres dah… semua data yang tampil sesuai harapan.

OK.. mudah-mudahan artikel ini berguna bagi Anda semuanya yang sering dipusingkan dengan kesalahan dalam script PHP + MySQL nya. Harapan saya.. mudah-mudahan pula, Anda bisa mencari kesalahan dalam script Anda sendiri dan memperbaikinya tanpa meminta bantuan orang lain lagi

PHP Best Practices - 3 : Use White Space and Indentation

PHP parser ignores white space and indentation but you should always put some white space and use indentation to make your code more readable and easy to debug. Have a look at these:

1. <?php echo "My name is John"; ?>
2. <?php function shamim($value){echo "My name is" . $value;}?>

And now have a look at this:

1. <?php
       echo "My name is John";
?>

2. <?php
   function shamim($value)
     {
          echo "My name is" . $value;
     }
?>

PHP Syntax Overview




This chapter will give you an idea of very basic syntax of PHP and very important to make your PHP foundation strong.

Escaping to PHP:

The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as 'escaping to PHP.' There are four ways to do this:

Canonical PHP tags:

The most universally effective PHP tag style is:
<?php...?>
If you use this style, you can be positive that your tags will always be correctly interpreted.

Short-open (SGML-style) tags:

Short or short-open tags look like this:
<?...?>
Short tags are, as one might expect, the shortest option You must do one of two things to enable PHP to recognize the tags:
·         Choose the --enable-short-tags configuration option when you're building PHP.
·         Set the short_open_tag setting in your php.ini file to on. This option must be disabled to parse XML with PHP because the same syntax is used for XML tags.

ASP-style tags:

ASP-style tags mimic the tags used by Active Server Pages to delineate code blocks. ASP-style tags look like this:
<%...%>
To use ASP-style tags, you will need to set the configuration option in your php.ini file.

HTML script tags:

HTML script tags look like this:
<script language="PHP">...</script>

Commenting PHP Code:

A comment is the portion of a program that exists only for the human reader and stripped out before displaying the programs result. There are two commenting formats in PHP:
Single-line comments: They are generally used for short explanations or notes relevant to the local code. Here are the examples of single line comments.
<?
# This is a comment, and
# This is the second line of the comment
// This is a comment too. Each style comments only
print "An example with single line comments";
?>
Multi-lines printing: Here are the examples to print multiple lines in a single print statement:
<?
# First Example
print <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon no extra whitespace!
END;
# Second Example
print "This spans
multiple lines. The newlines will be
output as well";
?>
Multi-lines comments: They are generally used to provide pseudocode algorithms and more detailed explanations when necessary. The multiline style of commenting is the same as in C. Here are the example of multi lines comments.
<?
/* This is a comment with multiline
    Author : Mohammad Mohtashim
    Purpose: Multiline Comments Demo
    Subject: PHP
*/
print "An example with multi line comments";
?>

PHP is whitespace insensitive:

Whitespace is the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters).
PHP whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters
For example, each of the following PHP statements that assigns the sum of 2 + 2 to the variable $four is equivalent:
$four = 2 + 2; // single spaces
$four <tab>=<tab2<tab>+<tab>2 ; // spaces and tabs
$four =
2+
2; // multiple lines

PHP is case sensitive:

Yeah it is true that PHP is a case sensitive language. Try out following example:
<html>
<body>
<?
$capital = 67;
print("Variable capital is $capital<br>");
print("Variable CaPiTaL is $CaPiTaL<br>");
?>
</body>
</html>
This will produce following result:
Variable capital is 67
Variable CaPiTaL is

Statements are expressions terminated by semicolons:

A statement in PHP is any expression that is followed by a semicolon (;).Any sequence of valid PHP statements that is enclosed by the PHP tags is a valid PHP program. Here is a typical statement in PHP, which in this case assigns a string of characters to a variable called $greeting:
$greeting = "Welcome to PHP!";

Expressions are combinations of tokens:

The smallest building blocks of PHP are the indivisible tokens, such as numbers (3.14159), strings (.two.), variables ($two), constants (TRUE), and the special words that make up the syntax of PHP itself like if, else, while, for and so forth

Braces make blocks:

Although statements cannot be combined like expressions, you can always put a sequence of statements anywhere a statement can go by enclosing them in a set of curly braces.
Here both statements are equivalent:
if (3 == 2 + 1)
  print("Good - I haven't totally lost my mind.<br>");
 
if (3 == 2 + 1)
{
   print("Good - I haven't totally");
   print("lost my mind.<br>");
}

Running PHP Script from Command Prompt:

Yes you can run your PHP script on your command prompt. Assuming you have following content in test.php file
<?php
   echo "Hello PHP!!!!!";
?>
Now run this script as command prompt as follows:
$ php test.php
It will produce following result:
Hello PHP!!!!!
Hope now you have basic knowledge of PHP Syntax.

Why PHP?


PHP software development can encompass a range of functionalities from forms and servers on your web pages to even managing forums for your page. In order to perform any complicated PHP coding that you are unable to do yourself, you will find many experienced PHP developers who can do a good job for you.A PHP software development company will definitely have many such experienced developers on its rolls and can provide you their services at a reasonable cost. You can also ask for a sample piece of coding that would help you make up your mind as to the competence of the company.

PHP is a very versatile server side scripting language that is appropriate for many types of website related PHP development, and can serve to make your webpages more dynamic and vibrant. It is an open source language, and is compatible with nearly all the operating systems and databases. It is quite easy to learn and beginners can perform simple operations by going through some of the detailed online tutorials too. PHP offers many preset variables and functions that are very helpful for a developer’s coding needs. The language is very similar to others like C, C++, Java and Perl, and anyone with experience in these will find it quite easy to start using PHP.