Friday 25 December 2015

PHP For Loops

So what’s a loop then? A loop is something that goes round and round. If I told you to move a finger around in a loop, you’d have no problem with the order (unless you have no fingers!) In programming, it’s exactly the same. Except a programming loop will go round and round until you tell it to stop. You also need to tell the programme two other things - where to start your loop, and what to do after it’s finished one lap (known as the update expression).
You can programme without using loops. But it’s an awful lot easier with them. Consider this.
You want to add up the numbers 1 to 4: 1 + 2 + 3 + 4. You could do it like this:
$answer = 1 + 2 + 3 + 4;
print $answer;
Fairly simple, you think. And not much code, either. But what if you wanted to add up a thousand numbers? Are you really going to type them all out like that? It’s an awful lot of typing. A loop would make life a lot simpler. You use them when you want to execute the same code over and over again.
We'll discuss a few flavours of programming loops, but as the For Loop is the most used type of loop, we'll discuss those first.


For Loops

Here’s a PHP For Loop in a little script. Type it into new PHP script and save your work. Run your code and test it out.
<?PHP
$counter = 0;
$start = 1;
for($start; $start < 11; $start++) {
$counter = $counter + 1;
print $counter . "<BR>";
}
?>
How did you get on? You should have seen the numbers 1 to 10 printed on your browser page.
The format for a For Loop is this:
for (start value; end value; update expression) {
}
The first thing you need to do is type the name of the loop you’re using, in this case for. In between round brackets, you then type your three conditions:
Start Value
The first condition is where you tell PHP the initial value of your loop. In other words, start the loop at what number? We used this:
$start = 1;
We’re assigning a value of 1 to a variable called $start. Like all variables, you can make up your own name. A popular name for the initial variable is the letter i . You can set the initial condition before the loop begins, like we did:
$start = 1;
for($start; $start < 11; $start++) {
Or you can assign your loop value right in the For Loop code:
for($start = 1; start < 11; start++) {
The result is the same – the start number for this loop is 1

End Value
Next, you have to tell PHP when to end your loop. This can be a number, a Boolean value, a string, etc. Here, we’re telling PHP to keep going round the loop while the value of the variable $start is Less Than 11.
for($start; $start < 11; $start++) {
When the value of $start is 11 or higher, PHP will bail out of the loop.

Update Expression
Loops need a way of getting the next number in a series. If the loop couldn’t update the starting value, it would be stuck on the starting value. If we didn’t update our start value, our loop would get stuck on 1. In other words, you need to tell the loop how it is to go round and round. We used this:
$start++
In a lot of programming language (and PHP) the double plus symbol (++) means increment (increase the value by one). It’s just a short way of saying this:
$start = $start + 1
You can go down by one (decrement) by using the double minus symbol (--), but we won’t go into that.

If anyone Want to Learn PHP Training Visit on - LinuxWorld Informatics Pvt. Ltd

So our whole loop reads “Starting at a value of 1, keep going round and round while the start value is less than 11. Increase the starting value by one each time round the loop.”
Every time the loop goes round, the code between our two curly brackets { } gets executed:
$counter = $counter + 1;
print $counter . "<BR>";
Notice that we’re just incrementing the counter variable by 1 each time round the loop, exactly the same as what we’re doing with the start variable. So we could have put this instead:
$counter ++
The effect would be the same. As an experiment, try setting the value of $counter to 11 outside the loop (it’s currently $counter = 0). Then inside the loop, use $counter- - (the double minus sign). Can you guess what will happen? Will it crash, or not? Or will it print something out? Better save your work, just in case!

Thursday 17 September 2015

Using WHERE to limit data in MySql and PHP

You can add a WHERE part to your SQL. But before you do, make sure you read the security section.
Using WHERE limits the records returned from a SQL statement. Most of the time, you don’t want to return all the records from your table. Especially if you have a large number of records. This will just slow things down unnecessarily. Instead, use WHERE. In the SQL below, we’re using WHERE to bring back only the matching records from the AddressBook table:
$SQL = “SELECT * FROM AddressBook WHERE email = ‘me@me.com’ “;
When the following code is run, only the records that have an email field of me@me.com will be returned.
To Know more php training in Jaipur. click here
You can specify more fields in your WHERE clause:
$SQL = “SELECT * FROM AddressBook WHERE First_Name = ‘Bill’ AND Surname = ‘Gates'”;
In the SQL statement above, we’ve used the AND operator as well. Only records that have First_Name value of Bill AND a Surname value of Gates will be returned.
You can also use the operators you saw in the variables section:
$SQL = “SELECT * FROM AddressBook WHERE ID >= ’10’ “;
In this SQL statement, we’re specifying that all the records from the AddressBook table should be returned WHERE the ID column is greater than or equal to 10.
Getting the hang of WHERE can really speed up your database access, and is well worth the effort. An awareness of the security issues involved is also a must.
In the next sections, we’ll take you through some fuller projects, and explain the code, and the things you need to consider when working on bigger projects like this. First up is a username and password system.

Thursday 20 August 2015

Create a database for a Survey App

This lesson is part of an ongoing Survey/Poll tutorial. The first part is here: Build your own Survey/Poll, along with all the files you need.
In the previous part of this lesson, you opened the phpMyAdmin screen. With this still open, click on “Please select a database“. Have a look at the items on the drop down list. You should see one called surveytest:
The surveytest database
If you can’t see surveytest there, it means you haven’t copied the surveytest folder to the correct place.
If you can see surveytest, select it from the drop down list. You should see the names of two tables appear:
The two tables in the surveytest database
Click on tblQuestions, and you’ll see the Structure for this Table (it’s too big to fit on this page, so click below to see it):
The Structure for the tblQuestions Table (opens in a new window – 59K
Under the Table heading, you’ll see the two tables in this database: answers and tblQuestions. Click on the Browse icon for tblQuestions, as in the image below:
Browse the tblQuestions Table
You will be taken to the Field names and Rows in the table:
The questions in the Table
The Field names run from left to right, and are important. They are:
QID
Question
qA
qB
qC
The tblQuestions table above has four rows of data, one for each question. The QID field is the one to pay attention to. The values in the sample table are q1, q2, q3, and q4. This QID field is the Primary Key in this table. This means that the data in this field has to be unique. You can then use this QID field to identify each row in the table. This same field, QID, is also in the answers table, along with the qA, qB, qC fields. This allows you to select all the records in both tables based on the QID field. You just pull all the records that match. For example, you can say “Select all the records in both tables where the QID field equals q1″.
Take a look at the answers table by clicking the link on the left hand side. Then click on Browse at the top. You should see this:
The answers Table
In the answers table, the unique field (the primary key) is the ID field. This is just an auto incrementing number that you used in an earlier section. You don’t have to worry about this field. But notice that the QID field is also there, along with the same values from the tblQuestions table: q1, q2, q3, and q4. This matching QID field in the answers table is something called a foreign key, in database terminology. Joining data from a primary key in one table to a foreign key in another is common technique in database creation. You do this when you want to keep data separate, and to avoid having too many fields in a single table. It also speeds things up. In our example database, we can keep the questions and answers separate.

(NOTE: If you have some knowledge about databases, you’ll know about Referential Integrity. Unfortunately, phpMyAdmin doesn’t enforce this. So if you delete a row from one table, the corresponding row in another table won’t get deleted – you have to code for that yourself!)

The A, B, and C fields in the answers table record how many people voted for each option of your question. So, for question four (q4) 28 people voted for option A, 127 people voted for option B, and 52 people voted for option C. If you look at the matching row (q4) in the tblQuestions table you’ll see that the question was: Do you believe in UFOs? (These answers were entered by us – it’s not real data!)
Now that you have a good idea about how the database works, let’s go through the code that sets a question.

 If anyone want to know about php training. please visit on - http://www.phptraininginjaipur.co.in/

Saturday 8 August 2015

10 Advanced PHP Tips To Improve Your Programming

PHP programming has climbed rapidly since its humble beginnings in 1995. Since then, PHP has become the most popular programming language for Web applications. Many popular websites are powered by PHP, and an overwhelming majority of scripts and Web projects are built with the popular language.
Because of PHP’s huge popularity, it has become almost impossible for Web developers not to have at least a working knowledge of PHP Training in Jaipur . This tutorial is aimed at people who are just past the beginning stages of learning PHP and are ready to roll up their sleeves and get their hands dirty with the language. Listed below are 10 excellent techniques that PHP developers should learn and use every time they program. These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

1. Use an SQL Injection Cheat Sheet

Sql Injection
A list of common SQL injections.
SQL injection is a nasty thing. An SQL injection is a security exploit that allows a hacker to dive into your database using a vulnerability in your code. While this article isn’t about MySQL, many PHP programs use MySQL databases with PHP, so knowing what to avoid is handy if you want to write secure code.
Furruh Mavituna has a very nifty SQL injection cheat sheet that has a section on vulnerabilities with PHP and MySQL. If you can avoid the practices the cheat sheet identifies, your code will be much less prone to scripting attacks.

2. Know the Difference Between Comparison Operators

Equality Operators
PHP’s list of comparison operators.
Comparison operators are a huge part of PHP, and some programmers may not be as well-versed in their differences as they ought. In fact, an article at I/O reader states that many PHP developers can’t tell the differences right away between comparison operators. Tsk tsk.
These are extremely useful and most PHPers can’t tell the difference between == and ===. Essentially, == looks for equality, and by that PHP will generally try to coerce data into similar formats, eg: 1 == ‘1′ (true), whereas === looks for identity: 1 === ‘1′ (false). The usefulness of these operators should be immediately recognized for common functions such as strpos(). Since zero in PHP is analogous to FALSE it means that without this operator there would be no way to tell from the result of strpos() if something is at the beginning of a string or if strpos() failed to find anything. Obviously this has many applications elsewhere where returning zero is not equivalent to FALSE.
Just to be clear, == looks for equality, and === looks for identity. You can see a list of the comparison operators on the PHP.net website.

3. Shortcut the else

It should be noted that tips 3 and 4 both might make the code slightly less readable. The emphasis for these tips is on speed and performance. If you’d rather not sacrifice readability, then you might want to skip them.
Anything that can be done to make the code simpler and smaller is usually a good practice. One such tip is to take the middleman out of else statements, so to speak. Christian Montoya has an excellent example of conserving characters with shorter else statements.
Usual else statement:
if( this condition )
{
$x = 5;
}
else
{
$x = 10;
}
If the $x is going to be 10 by default, just start with 10. No need to bother typing the else at all.
$x = 10;
if( this condition )
{
$x = 5;
}
While it may not seem like a huge difference in the space saved in the code, if there are a lot of else statements in your programming, it will definitely add up.

4. Drop those Brackets

Drop Brackets
Dropping brackets saves space and time in your code.
Much like using shortcuts when writing else functions, you can also save some characters in the code by dropping the brackets in a single expression following a control structure. Evolt.org has a handy example showcasing a bracket-less structure.
if ($gollum == 'halfling') {
$height --;
}
This is the same as:
if ($gollum == 'halfling') $height --;
You can even use multiple instances:
if ($gollum == 'halfling') $height --;
else $height ++; 
 
if ($frodo != 'dead')
echo 'Gosh darnit, roll again Sauron';
 
foreach ($kill as $count)
echo 'Legolas strikes again, that makes' . $count . 'for me!';

5. Favour str_replace() over ereg_replace() and preg_replace()

Str Replace
Speed tests show that str_replace() is 61% faster.
In terms of efficiency, str_replace() is much more efficient than regular expressions at replacing strings. In fact, according to Making the Web, str_replace() is 61% more efficient than regular expressions like ereg_replace() and preg_replace().
If you’re using regular expressions, then ereg_replace() and preg_replace() will be much faster than str_replace().

6. Use Ternary Operators

Instead of using an if/else statement altogether, consider using a ternary operator. PHP Value gives an excellent example of what a ternary operator looks like.
//PHP COde Example usage for: Ternary Operator
$todo = (empty($_POST[’todo’])) ?default: $_POST[’todo’]; 
 
// The above is identical to this if/else statement
if (empty($_POST[’todo’])) {
$action = ‘default’;
} else {
$action = $_POST[’todo’];
}
?>
The ternary operator frees up line space and makes your code less cluttered, making it easier to scan. Take care not to use more than one ternary operator in a single statement, as PHP doesn’t always know what to do in those situations.

7. Memcached

Memcached
Memcached is an excellent database caching system to use with PHP.
While there are tons of caching options out there, Memcached keeps topping the list as the most efficient for database caching. It’s not the easiest caching system to implement, but if you’re going to build a website in PHP that uses a database, Memcached can certainly speed it up. The caching structure for Memcached was first built for the PHP-based blogging website LiveJournal.
PHP.net has an excellent tutorial on installing and using memcached with your PHP projects.

8. Use a Framework

Framework

CakePHP is one of the top PHP frameworks.
You may not be able to use a PHP framework for every project you create, but frameworks like CakePHP, Zend, Symfony and CodeIgniter can greatly decrease the time spent developing a website. A Web framework is software that bundles with commonly needed functionality that can help speed up development. Frameworks help eliminate some of the overhead in developing Web applications and Web services.
If you can use a framework to take care of the repetitive tasks in programming a website, you’ll develop at a much faster rate. The less you have to code, the less you’ll have to debug and test.

9. Use the Suppression Operator Correctly

The error suppression operator (or, in the PHP manual, the “error control operator“) is the @ symbol. When placed in front of an expression in PHP, it simply tells any errors that were generated from that expression to now show up. This variable is quite handy if you’re not sure of a value and don’t want the script to throw out errors when run.
However, programmers often use the error suppression operator incorrectly. The @ operator is rather slow and can be costly if you need to write code with performance in mind.
Michel Fortin has some excellent examples on how to sidestep the @ operator with alternative methods. Here’s an example of how he used isset to replace the error suppression operator:
if (isset($albus))  $albert = $albus;
else                $albert = NULL;
is equivalent to:
$albert = @$albus;
But while this second form is good syntax, it runs about two times slower. A better solution is to assign the variable by reference, which will not trigger any notice, like this:
$albert =& $albus;
It’s important to note that these changes can have some accidental side effects and should be used only in performance-critical areas and places that aren’t going to be affected.

10. Use isset instead of strlen

Strlen
Switching isset for strlen makes calls about five times faster.
If you’re going to be checking the length of a string, use isset instead of strlen. By using isset, your calls will be about five times quicker. It should also be noted that by using isset, your call will still be valid if the variable doesn’t exist. The D-talk has an example of how to swap out isset for strlen:

Sunday 5 July 2015

PHP Training When You Have to Fulfill a Dream of Developing Your Own Site

You can find out more about what you need to do when you can finish the training for PHP and then start with your own web sites or you can work for some big enterprises so that your created or developed site will do better with the customers.

The PHP is a scripting language and is suitable for you if you like to work with the web development to create better web sites for yourself or for other companies, professionally. There are different ways you can start with the learning of the language through the PHP Course given by different centers and you can check out their syllabus so that you can start with the training. The professional expanse for such training can be vast in these days where the internet is the main thing and every business are based on the way you can develop the web site to gain the trust of the web traffic.

Effective reasons for going for such training
The PHP training is effective for people who are good at understanding the different languages for programming. You can make the life of the web site owner easier by the knowledge of the site building and administration. The site will grow larger day by day and you need to find out more effective ways to make the site attractive and informative for the customers of the site owner. You can also have a dream to build your own site so that you can start the online business through it. So if you can go through the complete training, you have a scope of professional acclimatization from different companies. You can also start earning decent profit for your business. These are the principal reason why you need to go for such training with the center. 

PHP knowledge will help in web development
The PHP knowledge can give you specific confidence to work with the modern companies for developing the new sites. The site development through programming language like PHP and HTML makes the business of the owner more efficient and profitable. The PHP training will give you scope to give ways to new ideas and bring about new changes that will give customers an intimate feel and comfort. The language is used by most of programmers, and it gives a better alternative for Microsoft ASP. 

Working as a professional when you know PHP
If you want to work with this language after you have completed the PHP training, you will find the working from a professional point of view is easier as they can be embedded in the codes of HTML. You can use the PHP with other software applications too, but you will find ways to work effectively by trying out different methods to bring perfect design. As the site grows larger, you will have to work more with PHP for bringing the reputable effect on your site. 

You will be able to incorporate changes by using include function of the software, and you can also use the server side language for scripting to create and evolve different interactive pages that will look sophisticated and professional for the site. These changes that you would love to create will need the knowledge that you can earn from a course from a PHP training center. The center often helps you with proper placements and you can start with the field work right after you finish with the course. 

Tuesday 30 June 2015

Why PHP for Making Dynamic Website Development?

PHP is one of the most popular site for creating Dynamic website. It offers a lot of benefits. If you are ready to add dynamic content to your webpages, consider the use of PHP Training. It's free, easy to learn and integrates well across many platforms and with various software programs. There are tons of tutorials available on the net.

Free and Capable
PHP is open source and it can be updated and developed by developers. Therefore, all its components are free to use and distribute. We can develop any type of website using PHP and it can handle with lot of traffic. Facebook, Twitter, Wikipedia and many other websites use it as their framewok. It can do anything that CGI programs because it is server-side scripting language.

Easy and Platform Independent
Syntax of PHP code is easy to understand. The developer who knows C/C++ they can easily learn PHP and code is embedded in the HTML source code. PHP provides high compatibility with leading operating systems and web servers such as thereby enabling it to be easily deployed across several different platforms. It can be run on all major operating systems like Linux, UNIX, Mac OS and Windows.

Supports All Major Web Servers and Major Databases
It supports all major web servers like Apache, Microsoft IIS, Netscape, personal webserver, iPlanet server and all major databases like MySQL, dBase, IBM DB2, InterBase, FrontBase, ODBC, PostgreSQL, SQLite, etc.

Quick Developments and secure
It uses its own memory space so that decreases the loading time and workload from the server. The processing speed is fast. PHP offers security as well that helps prevent malicious attacks. These security levels can be adjusted in the.ini file. It can develop applications like Ecommerce, CRM, CMS and Forums very fast. And It has multiple layers of security to prevent threats and malicious attacks.

Large Communities, Proven and Trusted
It has a large community of developers who regular and timely updates tutorials, documentation, online help and FAQs. It is being used since close to two decades now since its inception in 1995. It is trusted by thousands of websites and developers and the list is increasing day by day. It has also proven its capability and versatility by developing and maintaining some of the most highly visited and popular websites.

Talent Availability
You can hire PHP programmers more easily than any other language programmers since so many people know the language.

Monday 15 June 2015

Php Developement Intorduction

PHP is a scripting language designed to fill the gap between SSI (Server Side Includes) and Perl, intended for the web environment. Its principal application is the implementation of web pages having dynamic content. PHP has gained quite a following in recent times, and it is one of the frontrunners in the Open Source software movement. Its popularity derives from its C-like syntax, and its simplicity. The newest version of PHP is 5.5 and it is heavily recommended to always use the newest version for better security, performance and of course features.

If you've ever been to a website that prompts you to login, you've probably encountered a server-side scripting language. Due to its market saturation, this means you've probably come across PHP. PHP was designed by Rasmus Lerdorf to display his resume online and to collect data from his visitors.

To Know more about PHP Institute in Jaipur

Basically, PHP allows a static webpage to become dynamic. "PHP" is an acronym that stands for "PHP: Hypertext Preprocessor". The word "Preprocessor" means that PHP makes changes before the HTML page is created. This enables developers to create powerful applications which can publish a blog, remotely control hardware, or run a powerful website such as Wikipedia or Wikibooks. Of course, to accomplish something such as this, you need a database application such as MySQL.

Before you embark on the wonderful journey of Server Side Processing, it is recommended that you have a basic understanding of the HyperText Markup Language (HTML). But PHP can also be used to build GUI-driven applications for example by using PHP-GTK.

A single PHP file is like using magic on a webpage. In HTML, you have a standard page that is sent to anyone that visits your website. With PHP, you can dynamically change the page based on each individual user. Honestly, learn PHP and put it to the test. You will be extremely impressed with what an open source programming language can accomplish. I am not going to tell you that PHP is the best server side language that is out there, but it is the best for a tight budget or a beginner (Sorry, after coding with ColdFusion, I can no longer say PHP is my favorite).

What exactly does PHP do?
It can create custom content based on different variables
It is excellent at tracking user information
It can write or read information to databases, if partnered with a database language
It can run on any type of platform and server
 

Friday 12 June 2015

PHP interview questions and answers

What is PHP?

PHP: Hypertext Preprocessor is open source server-side scripting language that is widely used for web development. PHP scripts are executed on the server. PHP allows writing dynamically generated web pages efficiently and quickly. The syntax is mostly borrowed from C, Java and perl. PHP is free to download and use.

What is PEAR in php?

PEAR(PHP Extension and Application Repository) is a framework and repository for reusable PHP components. PEAR is a code repository containing all kinds of php code snippets and libraries.

PEAR also offers a command-line interface that can be used to automatically install "packages".

Explain how to submit form without a submit button.

We can achieve the above task by using JavaScript code linked to an event trigger of any form field and call the document.form.submit() function in JavaScript code.

Echo vs. print statement.

echo() and print() are language constructs in PHP, both are used to output strings. The speed of both statements is almost the same.

echo() can take multiple expressions whereas print cannot take multiple expressions.

Print return true or false based on success or failure whereas echo doesn't return true or false.

$message vs. $$message in PHP.

$message is a variable with a fixed name. $$message is a variable whose name is stored in $message.

If $message contains "var", $$message is the same as $var.

Explain the different types of errors in PHP.

Notices, Warnings and Fatal errors are the types of errors in PHP

Notices:

Notices represents non-critical errors, i.e. accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all but whenever required, you can change this default behavior.

Warnings:

Warnings are more serious errors but they do not result in script termination. i.e calling include() a file which does not exist. By default, these errors are displayed to the user.

Fatal errors:

Fatal errors are critical errors i.e. calling a non-existent function or class. These errors cause the immediate termination of the script.

Explain the importance of the function htmlentities.

The htmlentities() function converts characters to HTML entities.

What is MIME?

MIME - Multi-purpose Internet Mail Extensions.

MIME types represents a standard way of classifying file types over Internet.

Web servers and browsers have a list of MIME types, which facilitates files transfer of the same type in the same way, irrespective of operating system they are working in.

A MIME type has two parts: a type and a subtype. They are separated by a slash (/).

If anyone want to learn php training in Jaipur. Please Visit on - LinuxWorld Informatics Pvt. Ltd

Friday 29 May 2015

Why Use PHP Frameworks?

PHP frameworks offer solid extensible architecture, with features that make source code programming easier by providing standard templates, components and plug-ins. Most of these PHP frameworks are supported by corporate or open source communities who offers solid Web development support. CakePHP, Code Igniter and Zend are some of the most popular PHP Training frameworks, with both advantages and disadvantages depending on your PHP requirements.

Advanced PHP programmers need more than basic source code for Web development projects. PHP frameworks offer convenient short cuts to improve efficiency, functionality, processing power and speed. Choose amongst different PHP frameworks tailored to satisfy specific coding needs.

CakePHP specializes in providing a strict, standardized extensible architecture for rapid application development using common design patterns for Model-View-Controller (MVC) and Object-Relational Mapping (ORM). CakePHP is best for novices to MVC who want a solid foundation for PHP coding.

There is a steep learning curve for CakePHP coding conventions, but many claim it is well worth it. CakePHP also has slower processing power measured in requests per second, compared to Code Igniter and Zend.

CakePHP supports MVC, multiple databases, ORM, database objects, caching, validation, Ajax and user authentication. CakePHP uses access control security. A strong open source community provides feedback, as well as, many useful components and plug-ins.

Code Igniter (CI) offers better immediate usage and common tools that are well-documented. Key advantages include compatibility, easy configuration and flexibility in coding rules.

CI supports MVC, multiple databases, database objects, templates, caching, validation and other modules. Code Igniter uses more traditional coding conventions. In tests measuring requests per second, the Code Igniter was considerably faster than either CakePHP or Zend for a series of measurements.

One disadvantage for CI is the need to write PHP source code for the creation of a "session class" for security purposes.

The Zend Framework (ZF) permits the growth of PHP programming with features such as pre-packaged applications, assistance in reducing defects and solutions tailored for different platforms (i.e. IBM, Linux and Windows). Zend also helps with cloud computing.

Web developers don't need to reinvent the wheel; be wise and reuse common PHP source code tools. Zend offers added flexibility in PHP source code writing. Zend supports MVC, multiple databases, database objects, caching, validation and other modules. It is feature rich and has better support due to corporate backing. Zend security is access control based. Zend was in the middle between CakePHP and Code Igniter in processing speed tests for requests per second.

Tuesday 12 May 2015

Paid Summer Industrial Training -The Value of Internship in Today's Competitive Workplace

While we are still young, every experience we encounter will somehow help shape us into who we will be in the future. Be bold and different for a change. Have you ever thought about paid summer Industrial Training - about doing an Industrial Training for a company? If this hasn't crossed your mind, it should now and you should consider it knowing that in today's world, fresh graduates as well as other employed individuals will be competing for the jobs they want. It is not necessary for you to do a paid summer Industrial Training in order for you to land the job of your dreams however with the experience you have gained you have an edge over other graduates like you when you enter the job marketplace.

Pursuing an Industrial Training especially with a reputable and respected organization can help jumpstart your career even if you are merely a student. Through an Industrial Trainingyou will get a feel of how it is to work in a corporate setup and you are in for a great learning experience. Being an intern is not a complete waste of precious time. Long gone were the days when interns were just tasked to prepare coffee, run errands, photocopy materials, send messages or do messenger duties. Currently, interns are hired and trained like regular employees doing relevant duties and responsibilities. As an intern be willing to learn and work as this experience could look very good on your resume.

In applying for an Industrial Training in Jaipur you get a first hand experience of how it is like to apply for a job in preparing your comprehensive resume and undergoing a job interview. During your Industrial Training you learn numerous things that you could apply in the corporate setting when you enter a company as an employee. Here, you learn how to interact with customers, who are the major contributors to a company's existence. You discover how to interact with people from different walks of life if you are assigned to handle customer relations.

You also learn how to carry out yourself in the work place. You get to experience how it feels like to be working for someone else, to have a superior sometimes delegating never ending tasks and to meeting very strict deadlines on certain projects. In meeting deadlines you learn how it is to deal with stress as well as trying to impress your boss with a lot of competition from other trying hard employees.

Taking an Industrial Training in your chosen career is a plus. With the valuable experience you have gained, it wouldn't be that difficult to find a job related to your chosen field once you graduate.

An Industrial Training can also help you in your decision for the career path you want to have. Here, you get to see your strengths and weaknesses and you discover the occupation or profession you would really like to pursue.

You also learn to be independent when it comes to decision-making. Daily work schedules from basically deciding what corporate attire to wear, budgeting your time with the workload given, interacting with other employees and dealing with supervisors or superiors can increase your chances of adjusting easily when you enter the corporate environment in the future.

Aside from improving your communication abilities, you get to build a network of connections from the different people you meet within and outside the company. These contacts could later help you with your professional career when you enter the job market by recommending you to other companies you will soon be applying for or you could even be absorbed as a permanent employee after you study if they like the way you work for them.
The important aspect in paid summer Industrial Trainings is not the money that we earn during this period but the valuable experience that we can gain making us more confident and ready to face the corporate market.

Friday 1 May 2015

PHP - Origin, Application, Growth and Scope!

PHP is the most widely used scripting language, majorly used for web-development and application development, all across the globe. Basically, PHP is used for open source, general-purpose scripting language. PHP started as Personal Home Page tools, developed by Rasmus Lerdorf in 1995 and then it was proved so useful in various developments of websites & applications that it grew rapidly and became full-featured language that it is in today's market and it further acquired the name "PHP Hypertext Preprocessor" along the way to represent its expanded abilities. PHP Training in Jaipur is easy to use, fast, free, secure and versatile.

You must invest some time and learn PHP from a professional institute, if you want to be a successful website developer. To work on all operating systems like Linux, MAC, windows and others, it is very important to learn and work on this language practically. Primary benefit is that even if you are a non-programmer and a learner, you can grasp this language easily without any problem. PHP commands are quite simple, embedded with the easy HTML tags and coding. PHP commands are operated on a server so that it delivers high quality interactive web page.

Nowadays, there is huge demand in market for PHP developers for both experts and fresher. Originally, such intricately designed courses meet the requirements of both first timers and proficient developers. PHP training centers will teach you on real life projects to enhance your practical knowledge in leaps. Main advantage of PHP is that it is a free download and doesn't cost you a penny if you want to practice at your own desktop at home. There are many experts that can guide you for the most appropriate course for you according to your present skills and work experience.

PHP training has helped a number of people find employment. There are an ample number of opportunities for various "PHP Frameworks Training courses" as per industry demands. For those students who would like to gain more depth knowledge and understanding of various frameworks, there are few programs designed by PHP Experts. As the industry is growing rapidly, the latest amenities and state-of-art infrastructure are offered by the various institutions for better concentration and learning among students.
In recent time PHP developers have to struggle with coding and think in an object oriented manner, gain high traffics, research more than ever. Knowing user interface practices and dealing with different device resolutions isn't their concern but few firms are asking for it.

Overall, PHP is well known as the popular programming language and its dynamic development with time, which is now used to develop dynamic online stores, shopping carts, and various e-commerce applications for secured and convenient manner. Today PHP web development is spreading its wings like other technologies. For developing very flexible dynamic sites, PHP is one of the best choices in web development. For creating dynamic websites, web designer usually prefer PHP as the programming language because this script can be easily embedded into HTML coding. And if one talks about its scope then it's the best place for marketing and polishing of your talent.

Wednesday 4 March 2015

Why PHP and MySQL Are Vital to Web Development

PHP and MySQL offer the dynamic abilities necessary to run a website in the Web 2.0 era. Sure, there is AJAX and Javascript, but even they use PHP and MySQL for backend processing. Most websites utilize these languages to streamline development, maintenance and make updating tremendously easy.
PHP Before you begin programming a website, you should become familiar with two core ideas:
  1. follow coding standards. Assume you have developed a website for a client. For whatever reason, not necessarily bad, they hire another programmer to to make some changes. The other programmer informs the client it will cost more to make the repairs due to your poor coding. If you didn't have a bad name before, you do now.
  2. document your code for the same reason as #1, but also because if you are hired to go back and make some changes in six months or a year, you will want to know what the purpose of everything was. PHP Documentor makes this tremendously easy.
When I code a website, I do so on my personal computer which acts like a web server. I use AppServ for Windows. You can also use XAMPP for Windows or MAMP for OS X. With PHP, you do not need a program to write the code (though there are many available). Code can be written using any text editor including Notepad. PHP makes communicating across a website easy by sending data via session variables or cookies. This, essentially, is bits and pieces of information that the website needs to function. For example, if you have a contact form you would most likely use PHP to send that form data to either (or both) the MySQL database or via email; either of which are very easy.
With PHP, you can control what type of attachments are submitted with that form. Let's say you operate a social media website and your visitors have the ability to upload images. Yet, you don't want them to be over 100kb and they must be in JPEG or GIF format. PHP makes this easy, also. In addition, you can use PHP anywhere within an HTML document or even a CSS document (provided that PHP is told to do so). This allows you to effectively customize a website around a user's particular preference.
With PHP, the limitations are few - primarily, webmasters and visitors want and expect the transfer of data without interruption; i.e., loading of another page. This is done with AJAX, Flash or Javascript though PHP is still most likely involved. Though new languages are introduced on an annual basis, PHP's wide popularity and usage make it highly unlikely to disappear for many years to come making it an extremely wise choice even for new websites.
PHP Frameworks CakePHP is a free PHP framework developed by a non-profit organization based in Nevada. When needing to customize a website solution, CakePHP is my first choice.
Zend Framework is another free PHP framework sponsored by Zend Technologies. Zend tends to lead the PHP framework field by not only having a larger community, but also developing coding standards as mentioned above.
Though you still must have adequate knowledge of PHP and it's abilities, both frameworks make streamlining applications tremendously easier. There isn't one huge advantage of one over the other. I use CakePHP because it was the first one I got my hands on. I've used Zend, as well and my only complaint was that the class names were much longer to type than those required in CakePHP - hey, I'll take a shortcut when I can get it.:)
MySQL MySQL is a backend database most frequently used in combination with PHP. MySQL is a flat file database meaning which essentially means it operates from files as opposed to a relational database such as Microsoft Office Access. However, this does not limit MySQL's capabilities and, in fact, can be made to act relational by using such methods as hierarchical data trees. MySQL allows the storage of website information without the need of individual files - say a visitor's preferences, for instance. This saves disk space and even makes processing speeds slightly faster.
In addition, learning the query languages is pretty easy:
SELECT 'post_content' FROM 'wp_posts' WHERE 'post_title'='MySQL Tutorial';
Simply put, the above query tells MySQL to return all posts content from my Wordpress table (wp_posts) where the post title is "MySQL Tutorial". Almost English-like, isn't it? Using both MySQL and PHP are vital for the operation of a website. Using them with a framework such as CakePHP and Zend can make life tremendously easy for a developer building a custom solution. The easier it is, the cheaper it is on the client and that should always be your ultimate goal.
PHP and MySQL offer the dynamic abilities necessary to run a website in the Web 2.0 era. Sure, there is AJAX and Javascript, but even they use PHP and MySQL for backend processing. Most websites utilize these languages to streamline development, maintenance and make updating tremendously easy.
Tim Trice is an online marketing consultant and website developer [http://www.timtrice.com] based in Houston, Texas. He can help get your business and your website pointed in the right direction. If you are looking for someone to give you an honest opinion on your current website or want to know how to start one, contact him to get a free, no obligation website review and analysis [http://www.timtrice.com/services/free-website-review-and-quote/] today!

Article Source: http://EzineArticles.com/4316044

Monday 2 February 2015

What Is a PHP Template?

Websites have become a must not only for businesses but for many personal and artistic projects as well. There are many ways to create a website, from hiring a full-scale web development company, to doing it yourself by hand, to premade theme-based websites. Each of these approaches has its benefits and drawbacks, but using a PHP template offers the best features of all three.

PHP is a common coding language used to build websites. There are nearly 250 million websites built in PHP on over 2 million servers. These websites run the full range from visually intense to minimalistic, from animated to static media, and from blogging to e-commerce to simple informational pages.

While PHP Training in Jaipur is among the preferred coding languages for web developers, many users are not experienced coders and would not feel comfortable building their own website from scratch. And that's why the idea the PHP template was invented.

A PHP template is essentially a fully coded, full designed website that is missing only content (the words and pictures you want to include). All the PHP files are provided with the template, including any CSS (visual style programming), and are ready to upload to your server to make your site go live. But even better, because you have access to every line of code in the template, you have total freedom to change any aspect of the site you'd like to change: if the border is brown and you want it to be blue, you can do that; if you want the margins wider, or the header bigger, or to change the default font - you can do that.

Of course, there are a variety of platforms that offer customizable "theme based" websites, but many have very limited customization. Typically, when you buy a "theme" for a web platform you can only change the CSS, or visual styling, and have limited access to the underlying code. That means you can make only the most cosmetic changes. With a PHP template you can make deep-level changes to the framework and functionality of the website itself.

In other words, a PHP template provides more customization than a theme-based website, requires little coding knowledge and yet costs a fraction of hiring a professional designer. A designer can easily charge over $200 per hour, whereas you can buy a huge collection of PHP templates for less than $40.

Ultimately, the amount of coding skill you need to use PHP templates is up to you. If you want to make only minor changes or use a template as-is, you might not need any coding experience at all. If you're an experienced web designer you can use the template as a jumping off point and build something completely unique in record time. PHP templates are the most flexible way of building attractive websites.

Tuesday 6 January 2015

3 Ways to Develop Cross Platform Desktop Apps with PHP

PHP as a cross-platform desktop app development language? Blasphemy! Nonetheless, it’s possible.
A few years ago, everything those interested in bringing PHP to the desktop had had was the now long abandoned GTK PHP. Since then, new players have appeared, though let’s first answer the “why”.

Why?

Why would anyone develop cross platform PHP Training in Jaipur apps for the desktop? Why not opt for something that can actually tie into the low level APIs of the operating system, like Adobe AIR? Why not go with something outdated and bloated but reliable, like Java? Why not make it a Chrome app and if you need native support, use Native Client? Hell, if you want a scripting language, why not just go with Python? Everything goes, as long as we avoid having to bundle a server with the whole shebang, right?
Off the top of my head, I can think of several far fetched scenarios:
  1. You need a good middle ground between easy syntax and good structure, which is PHP, and you can’t be bothered to learn new languages like ActionScript
  2. You’re running IT in a company with highly computer illiterate people, and the only way to force them into using a good browser for your company app is to embed it into the app you deliver. It’s still a web app, but opens in a headless Chrome!
  3. You want to avoid paying hosting costs for your own personal application, and you like to carry it with you on a USB stick. You just plug it in, run it, and your app is there – using the same SQLite DB from before. If you need to sync online, you send the whole DB export to Dropbox or some such service at the click of a button, thus making sure you’re literally the only one who can access your “web app” even without your computer.
  4. You don’t need low level OS API access – you just want to make a browser based game, or a helper app, or something similarly simple. PHP is perfectly fine for that, and you already know the language.
These scenarios might look like grasping at straws, and indeed, I really can’t think of a REAL, practical reason to want to do it that doesn’t have a viable alternative. Still, it’s nice to know it’s possible. Let’s see how.

1. Nightrain

Nightrain is a pre-packaged set of PHP-hosting prerequisites powered by PHP 5.5.x at the moment. It’s a packager written in Python that uses PHP’s internal server to host your app, thus avoiding Apache and Nginx and minimizing configuration shenanigans. However, this also means some more advanced aspects are unavailable, and you can only really use it for very rudimentary apps.
Another big con is that on Windows, a command prompt is launched first, and then the “app”. The command windows must stay open if you want to use the app, and this might be more than a little confusing to the technically illiterate people of scenario 2) above.
01
What’s more, you can only run one nightrain app by default, because it actually launches a server on port 8000 and then makes the headless browser that opens “secretly” visit localhost:8000. If you want to launch several different nightrain apps, you need to change the port in settings.ini. This also means that simply visiting localhost:8000 in your host machine’s browser will show you the same app.
Nightrain is compatible with most PHP apps/frameworks out of the box, as long as you change the database to SQLite, which is what’s used, and tweak the bundled php.ini for some missing extensions, if any. MySQL is not bundled and installing it alongside the regular stack is no simple matter. It’s very simple to make the app send the SQLite data upstream to a server you use for a centralized database anyway, so using only SQLite on the system where the app is running is somewhat logical.
By far the biggest drawback of the app is that it uses WX widgets to power the headless browser, and on Windows, this seems to come down to IE7. Changing it seems possible, by means of WXPython as mentioned in the issue linked above, but hasn’t yet been attempted. One can only hope the browser object will be updated to something more usable some time soon – until then, and until all the other critical drawbacks are fixed, I can’t even begin to imagine a use for Nightrain.

2. WXPHP

wxPHP stands for “wxWidgets for PHP” and is a PHP extension that wraps the wxWidgets library, which allows to write multi-platform desktop applications that make use of the native graphical components available to the different platforms. – Wikipedia
You install wxPHP as a separate program, which then gives you support for execution of .wxphp files by simply doubleclicking on them.
01
This means your applications are mere files, and you can distribute them everywhere with ease. You can organize your code into files and classes as usual and distribute folders. The main .wxphp file can then include these other resources.
The installation comes with several examples, including one which initializes WebView and loads the wxPHP website in a wx frame. One thing to note is that with wxPHP you aren’t developing websites as you would on the web. In other words, you don’t develop offline websites, but string together various wx widgets. As such, the library has a bit of a learning curve, and you’ll be lacking the HTML5 features you might be used to, or the simplicity of web development. There is some Proof of Concept of the internal PHP server running and serving requests, but that’s experimental and complex, and once again exposes the localhost, just like Nightrain.
wxPHP also comes with an adorable form building tool which will help you automatically generate the PHP code you need for your wxPHP apps by means of a wysiwyg editor.
02
03
Before you dismiss wx as trivial, people have developed more than basic apps in it. For example, here’s a PHP Editor with remote debugging and a plugin API.
If you’re serious about PHP desktop development, wxPHP is by far the better option when compared to Nightrain, even though Nightrain lets you write good old HTML for GUI.
One of the biggest advantages of wx here is the fact that once installed, all .wxphp files can be run at the click of the mouse. No additional installs, no awkward console windows. For technically illiterate people, that’s a godsend – you can easily distribute the app inside your company via a simple email, and the update procedure is as simple as overwriting a file.

3. TideSDK

TideSDK has a somewhat different approach than the above two. You install an SDK to be able to develop applications, and each platform has certain prerequisites. TideSDK is actually the renamed Titanium Desktop project. Titanium remained focused on mobile, and abandoned the desktop version, which was taken over by some people who have open sourced it and dubbed it TideSDK.
Once installed as per the Getting Started guide, and once we have the TideSDK Developer app (a helper application which will guide us in bundling our application into a distributable package), we can get started developing. Apps you build with Tide (via the helper app, or via the command line) will be both distributable as purely executable, or can be distributed as installable packages which get the whole “app” treatment, including an installation procedure embedded, making them uninstallable via Add/Remove Programs on Windows or your package managers on other operating systems.
Applications resources are used in conjunction with a WebKit client and a familiar and extensive API. The API is privileged, providing filesystem access that allows you to read and manage files. APIs are also provided to create and interact with a local database. Network API allows to create clients and servers or to interface with HTTP at a much lower level. It is also possible to open socket connections to other services.
Generally, TideSDK uses HTML, CSS and JS to render applications, but it supports scripted languages like Python, Ruby and PHP as well. The engine behind the rendering is WebKit which means it’ll be somewhat slow to start, but it’ll support the latest web technologies.
The heart of TideSDK is an object bridge compiled into the WebKit component. The bridge allows other scripting languages – python, php or ruby – to run on the HTML page using script tags in the DOM, just like JavaScript. You can also directly call .py, .rb or .php files from within your application.
PHP is activated by adding a module statement to the manifest file, like so:
#appname:HelloWorld#appid:com.tidesdk.helloworld#publisher:Software in the Public Interest (SPI) Inc#image:default_app_logo.png#url:http//tidesdk.org#guid:845e9c3c-c9ff-4ad4-afdf-9638092f044f#desc:Sample Hello World application#type:desktop
runtime:1.3.1-beta
app:1.3.1-beta
codec:1.3.1-beta
database:1.3.1-beta
filesystem:1.3.1-beta
media:1.3.1-beta
monkey:1.3.1-beta
network:1.3.1-beta
platform:1.3.1-beta
process:1.3.1-beta
ui:1.3.1-beta
worker:1.3.1-beta
php:1.3.1-beta
Note that using the script modules for scripting languages will incur significant performance penalties on the installation and runtime of your app(s).
Interestingly, TideSDK features an object bridge which lets you, when using PHP in your apps, convert data seamlessly from JS to PHP and back. You can read more here, but a detailed TideSDK tutorial is coming soon.
There are two major downsides to using TideSDK for PHP desktop app development:
  1. The PHP development workflow is severely underdocumented and highly susceptible to bugs, but almost impossible to debug.
  2. The bundled PHP version is terribly outdated – version 5.3.X at the time of this writing. While it’s relatively easy to replace it with an up-to-date one through the /modules folder in the SDK’s installation directory, it’s an additional nuisance and lacks many modern PHP features which might come in handy in desktop app development, not to mention the built-in server which also might get an esoteric use case here.
  3. There is a learning curve. The DOM API is different from what you may be used to in web development. To echo something on screen, you would need to call $document->write() rather than echo. It’s a minor difference, but it isn’t well documented and can trip you up.
  4. By far the biggest downside is the compilation. The package you get by building an app is bound to the platform you’ve built it on. To build the app for multiple environments, you need to HAVE those multiple environments. The Windows/Linux disparity is easily solved with virtual machines (though easier to solve if your host is Windows and you have Linux VMs than the other way around), but good luck compiling it for OS X unless you’ve got an OS X device, too.
TideSDK is a neat option, but it’s far from usable. It’ll do great for HTML/CSS/JS delivery, but when it comes to PHP, I believe wxPHP is still your best bet.