Yii is a high-performance component-based PHP framework for developing large-scale Web applications. It enables maximum reusability in Web programming and can significantly accelerate the development process. The name Yii (pronounced as Yee or [ji:]) stands for easy, efficient and extensible.
What is Yii Best for?
Yii is a generic Web programming framework that can be used for developing virtually all sorts of Web applications. Because it is light-weighted and equipped with sophisticated caching solutions, it is especially suitable for developing high-traffic applications, such as portals, forums, content management systems (CMS), e-commerce systems, etc.
How is Yii Compared with Other Frameworks?
Like most PHP frameworks, Yii is an MVC framework. Yii excels over other PHP frameworks in that it is efficient, feature-rich and clearly- documented. Yii is carefully designed from the beginning to fit for serious Web application development. It is neither a byproduct of some pro ject nor a conglomerate of third-party work. It is the result of the authors’ rich experience of Web application development and the investigation and reflection of the most popular Web programming frameworks and applications.
INTRODUCTION
The Yii framework is free software. It is released under the terms of the following BSD License.
1.1 New Features
This page summarizes the main new features introduced in each Yii release.
Version 1.0.7
Added support for displaying call stack information in trace messages
– Logging Context Information
Added index option to AR relations so that related ob jects can be indexed using the values of a specific column
– Relational Query Options
Version 1.0.6
Added support for using named scope with update and delete methods:
– Named Scopes
Added support for using named scope in the with option of relational rules
Added support for profiling SQL executions
– Profiling SQL Executions
Added support for logging additional context information
– Logging Context Information
Added support for customizing a single URL rule by setting its urlFormat and case Sensitive options:
– User-friendly URLs
Added support for using a controller action to display application errors:
– Handling Errors Using an Action
Version 1.0.5
Enhanced active record by supporting named scopes. See:
– Named Scopes
– Default Named Scope
– Relational Query with Named Scopes
Enhanced active record by supporting lazy loading with dynamic query options. See:
– Dynamic Relational Query Options
Enhanced CUrlManager to support parameterizing the route part in URL rules. See:
– Parameterizing Routes in URL Rules
1.2 What is Yii
Yii is a high-performance component-based PHP framework for developing large-scale Webapplications. It enables maximum reusability in Web programming and can significantly
accelerate the development process. The name Yii (pronounced as Yee or [ji:]) standsfor easy, efficient and extensible.
Requirements
To run an Yii-powered Web application, you need a Web server supporting PHP 5.1.0 or higher.
For developers who want to use Yii, understanding ob ject-oriented programming (OOP)is very helpful, because Yii is a pure OOP framework.
1.3 What is Yii Best for?
Yii is a generic Web programming framework that can be used for developing virtually all sorts of Web applications. Because it is light-weighted and equipped with sophisticated
caching solutions, it is especially suitable for developing high-traffic applications, such as
portals, forums, content management systems (CMS), e-commerce systems, etc.
1.4 How is Yii Compared with Other Frameworks?
Like most PHP frameworks, Yii is an MVC framework. Yii excels over other PHP frameworks in that it is efficient, feature-rich and clearly-documented. Yii is carefully designed from the beginning to fit for serious Web application development. It is neither a byproduct of some pro ject nor a conglomerate of third-partywork. It is the result of the authors’ rich experience of Web application development and the investigation and reflection of the most popular Web programming frameworks and applications.
Defining crowdsourcing (CS) systems turns out to be surprisingly tricky. Since many view Wikipedia and Linux as well-known CS examples, as a natural starting point, we can say that a CS system enlists a crowd of users to explicitly collaborate to build a long-lasting artifact that is beneficial to the whole community.
Crowdsourcing occurs when businesses make use of the free, wide audience that the Internet gives them, and uses that audience to gain ideas, a product or service, or feedback - things that will ultimately lead that business to profit. It is typically opening up an idea that would normally be performed by one or a few people to a large group of people (or anyone on the Internet, as is becoming common). The obvious benefits of the concept are that you as a business have numerous volunteers (often into the hundreds, if not thousands) to help you solve a problem, you save money, and you get to pick and choose what you want out of many offers, all at your time and leisure. It is an efficient and quick way of sourcing talent.
Crowdsourcing systems enlist a multitude of humans to help solve a wide variety of problems. Over the past decade, numerous such systems have appeared on the World-Wide Web. Prime examples include Wikipedia, Linux, Yahoo! Answers, Mechanical Turk-based systems, and much effort is being directed toward developing many more. As is typical for an emerging area, this effort has appeared under many names, including peer production, user-powered systems, user-generated content, collaborative systems, community systems, social systems, social search, social media, collective intelligence, wikinomics, crowd wisdom, smart mobs, mass collaboration, and human computation. We define and classify such systems, then describe a broad sample of systems. The sample ranges from relatively simple well-established systems such as reviewing books to complex emerging systems that build structured knowledge bases to systems that "piggyback" onto other popular systems. We discuss fundamental challenges such as how to recruit and evaluate users, and to merge their contributions. Given the space limitation, we do not attempt to be exhaustive. Rather, we sketch only the most important aspects of the global picture, using real-world examples
Sample CS Systems on the Web
Building on this discussion of CS dimensions, we now focus on CS systems on the Web, first describing a set of basic system types, and then showing how deployed CS systems often combine multiple such types.
The accompanying table shows a set of basic CS system types. The set is not meant to be exhaustive; it shows only those types that have received most attention. From left to right, it is organized by collaboration, architecture, the need to recruit users, and then by the actions users can take. We now discuss the set, starting with explicit systems.
Explicit Systems: These standalone systems let users collaborate explicitly. In particular, users can evaluate, share, network, build artifacts, and execute tasks. We discuss these systems in turn
CS Systems on the Web
We now build on basic system types to discuss deployed CS systems on the Web. Founded on static HTML pages, the Web soon offered many interactive services. Some services serve machines (such as DNS servers, Google Map API server), but most serve humans. Many such services do not need to recruit users (in the sense that the more the better). Examples include pay-parking-ticket services (for city residents) and room-reservation services. (As noted, we call these crowd management systems). Many services, however, face CS challenges, including the need to grow large user bases. For example, online stores such as Amazon want a growing user base for their services, to maximize profits, and startups such as epinions.com grow their user bases for advertising. They started out as primitive CS systems, but quickly improved over time with additional CS features (such as reviewing, rating, networking). Then around 2003, aided by the proliferation of social software (for example, discussion groups, wiki, blog), many full-fledged CS systems (such as Wikipedia, Flickr, YouTube, Facebook, MySpace) appeared, marking the arrival of Web 2.0. This Web is growing rapidly, with many new CS systems being developed and non-CS systems adding CS features.
The goal is to further our collective understandingboth conceptual and practicalof this important emerging topic. It is also important to note that many crowdsourcing platforms have been built. Examples include Mechanical Turk, Turkit, Mob4hire, uTest, Freelancer, eLance, oDesk, Guru, Topcoder, Trada, 99design, Innocentive, CloudCrowd, and Cloud-Flower. Using these platforms, we can quickly build crowdsourcing systems in many domains. In this survey, we consider these systems (that is, applications), not the crowdsourcing platforms themselves. It is also important to note that many crowdsourcing platforms have been built. Examples include Mechanical Turk, Turkit, Mob4hire, uTest, Freelancer, eLance, oDesk, Guru, Topcoder, Trada, 99design, Innocentive, CloudCrowd, and Cloud-Flower. Using these platforms, we can quickly build crowdsourcing systems in many domains. In this survey, we consider these systems (that is, applications), not the crowdsourcing platforms themselves.
Classifying CS systems:
CS systems can be classified along many dimensions. Here, we discuss nine dimensions we consider most important. The two that immediately come to mind are the nature of collaboration and type of target problem. As discussed previously, collaboration can be explicit or implicit, and the target problem can be any problem defined by the system owners (for example, building temporary or permanent artifacts, executing tasks).
The next four dimensions refer respectively to how a CS system solves the four fundamental challenges described earlier: how to recruit and retain users; what can users do; how to combine their inputs; and how to evaluate them. Later, we will discuss these challenges and the corresponding dimensions in detail. Here, we discuss the remaining three dimensions: degree of manual effort, role of human users, and standalone versus piggyback architectures.
Degree of manual effort: When building a CS system, we must decide how much manual effort is required to solve each of the four CS challenges. This can range from relatively little (for example, combining ratings) to substantial (for example, combining code), and clearly also depends on how much the system is automated. We must decide how to divide the manual effort between the users and the system owners. Some systems ask the users to do relatively little and the owners a great deal. For example, to detect malicious users, the users may simply click a button to report suspicious behaviors, whereas the owners must carefully examine all relevant evidence to determine if a user is indeed malicious. Some systems do the reverse. For example, most of the manual burden of merging Wikipedia edits falls on the users (who are currently editing), not the owners.
Role of human users: We consider four basic roles of humans in a CS system. Slaves:humans help solve the problem in a divide-and-conquer fashion, to minimize the resources (for example, time, effort) of the owners. Examples are ESP and finding a missing boat in satellite images using Mechanical Turk. Perspective providers: humans contribute different perspectives, which when combined often produce a better solution (than with a single human). Examples are reviewing books and aggregating user bets to make predictions.Content providers: humans contribute self-generated content (for example, videos on YouTube, images on Flickr). Component providers: humans function as components in the target artifact, such as a social network, or simply just a community of users (so that the owner can, say, sell ads). Humans often play multiple roles within a single CS system (for example, slaves, perspective providers, and content providers in Wikipedia). It is important to know these roles because that may determine how to recruit. For example, to use humans as perspective providers, it is important to recruit a diverse crowd where each human can make independent decisions, to avoid "group think."
In the field of computer security, phishing is the criminally fraudulent process of attempting to acquire sensitive information such as usernames, passwords and credit card details, by masquerading as a trustworthy entity in an electronic attempting to acquire sensitive information such as usernames, passwords and credit card details, by masquerading as a trustworthy entity in an electronic communication. Phishing is a fraudulent e-mail that attempts to get you to divulge personal data that can then be used for illegitimate purposes.
THE MEANING OF PHISHING
In the cyber-world phishing (also known as carding and spoofing) is a form of illegal act whereby fraudulently sensitive information is acquired, such as passwords and credit card details, by a person/entity masquerading as a trustworthy person or business in an apparently official electronic communication, such as an e-mail or instantaneous communication.
ORIGIN OF PHISHING
Early attempts were made at phising in 1990s when offenders originally created on AOL accounts with fake, algorithmically generated credit card numbers - these accounts could last weeks or even months until new ones were required. AOL subsequently, brought in measures in late 1995 to prevent this, so early AOL crackers resorted to phising for legitimate AOL accounts.
Phishing on AOL was closely linked with the warez community that exchanged pirated software. For instance, a cracker might pose as an AOL staff member and send an instant message to a potential victim, asking the victim to reveal his or her password. Later, AOL's policy enforcement with respect to phising and warez became stringent and removed pirated software off AOL servers. AOL simultaneously developed a system to quickly deactivate any account involved in phising besides adopting other steps to combat this form of cyber fraud.
There are many variations on this scheme. It is possible to Phish for other information in additions to usernames and passwords such as credit card numbers, bank account numbers, social security numbers and mothers’ maiden names. Phishing presents direct risks through the use of stolen credentials and indirect risk to institutions that conduct business on line through erosion of customer confidence. The damage caused by phishing ranges from denial of access to e-mail to substantial financial loss.
This report also concerned with anti-phishing techniques. There are several different techniques to combat phishing, including legislation and technology created specifically to protect against phishing. No single technology will completely stop phishing. However a combination of good organization and practice, proper application of current technologies and improvements in security technology has the potential to drastically reduce the prevalence of phishing and the losses suffered from it. Anti-phishing software and computer programs are designed to prevent the occurrence of phishing and trespassing on confidential information. Anti-phishing software is designed to track websites and monitor activity; any suspicious behavior can be automatically reported and even reviewed as a report after a period of time.
This also includes detecting phishing attacks, how to prevent and avoid being scammed, how to react when you suspect or reveal a phishing attack and what you can do to help stop phishers.
E-Mail Is the "Bait" The e-mail states that due to internal accounting errors or some other pretext, certain information must be updated to continue your service. A link in the message directs the user to a Web page that asks for financial information. The page looks genuine, because it is easy to fake a valid Web site. Any HTML page on the Web can be copied and modified to suit the phishing scheme. Rather than go to a Web page, another option is to ask the user to call an 800 number and speak with a live person, who makes the scam seem even more genuine.
Anyone Can Phish A "phishing kit" is a set of software tools from phishing developers that help the novice phisher copy a target Web site and make mass mailings. It may even include lists of e-mail addresses (how thoughtful of people to create these kits!).
The Indian herbal plant Tulsi has a lot of significance in the Hindu religion. The term "Tulsi" is used in the context of one who is absolutely incomparable. Tulsi has a lot of reverence for the Hindus. Infact, people worship Tulsi everyday in the morning as well as evening time. This Indian basil basically grows in the warm and tropical regions. There are two main varieties of this aromatic plant, namely Shyama tulsi and Rama tulsi. Well, out of the two, the former one is of greater medicinal value. Rama Tulsi, on the hand, is primarily used for worship.
In this section, we will cover the following aspects related to the holy basil Tulsi:
Tulsi Benefits:-
Tulsi plant has a lot of significance for mankind, due to the manifold medicinal benefits it provides. Tulsi leaves are widely used in the preparation of Ayurvedic medicines. It is known to promote the longevity of life. The extracts obtained from the plant are extensively brought to use for curing various diseases such as the common cold, inflammation, malaria, heart disease, headaches etc.
Tulsi Legends
Tulsi is considered to be highly sacred in the Hindu religion. Most of the Hindus offer daily prayers to Tulsi Devi. But, not many people are aware about the origin of Tulasi plant. Well, there are many interesting legends about Tulsi. There is a famous legend about Krishna Tulsi, which suggests that Tulsi was the incarnation of a gopi, who was deeply in love with Lord Krishna. She was cursed by Radha, the consort of the Lord.
Tulsi Vivah
Tulsi vivah is a grand festivity that has a lot of significance for Hindus. There is an interesting legend behind the celebration of Tulsi vivah festival. Tulsi is considered to be an incarnation of Maha Lakshmi, who was born as Vrinda in her previous birth. Tulsi was married to a demon king Jalandhar. She offered prayers to Lord Vishnu to protect her husband from being harmed by any God.
Tulsi Puja
Tulsi is a consecrated plant that holds lot of importance for the traditional Hindus. In most of the Hindu homes, people worship Tulsi plant on a daily basis. Many people keep a plant of Tulsi in front of their house, since Tulsi has a lot of reverence for them.
Tulsi as a Deity
Tulsi is a prominent Indian basil that is considered to be very sacred. In the house of every Hindu family, you'll find a Tulsi planted in the courtyard. In certain homes, Tulsi plant is kept in a specially constructed structure and is surrounded by images of Hindu Gods and Goddesses from all four sides.
DNA computing is a form of computing which uses DNA and molecular biology, instead of the traditional silicon-based computer technologies.
A changing view of biology has given rise to the new field of "DNA computers". This field seeks to use biological molecules such as DNA and RNA to solve basic mathematical problems. Fundamentally, many of these experiments recapitulate natural evolutionary processes that take place in biology, especially during the early evolution of life and the creation of genes. This computer will explore both new uses of nucleic acids as the building blocks of life but also complex architectural structures and even biomolecular-computing "hardware". It will also examine the information processing in cells that have had billions of years to evolve and to perfect a "molecular computer".
This field was initially developed by Leonard Adleman of the University of Southern California. In 1994, Adleman demonstrated a proof-of-concept use of DNA as form of computation which was used to solve the seven-point Hamiltonian path problem. Since the initial Adleman experiments, advances have been made, and various Turing machines have been proven to be constructable.
There are works over one dimensional lengths, bidimensional tiles, and even three dimensional DNA graphs processing.
DNA computers were initially coupled with an input and output module and is capable of diagnosing cancerous activity within a cell, and then releasing an anti-cancer drug upon diagnosis. DNA computing is fundamentally similar to parallel computing in that it takes advantage of the many different molecules of DNA to try many different possibilities at once.
For certain specialized problems, DNA computers are faster and smaller than any other computer built so far. But DNA computing does not provide any new capabilities from the standpoint of computational complexity theory, the study of which computational problems are difficult. For example, problems which grow exponentially with the size of the problem (EXPSPACE problems) on von Neumann machines still grow exponentially with the size of the problem on DNA machines. For very large EXPSPACE problems, the amount of DNA required is too large to be practical.
It was in 1994 that Adleman first used DNA, the molecule that our genes are made of, to solve a simple version of the "traveling salesman" problem. In this classic conundrum, the task is to find the most efficient path through several cities-given enough cities, the problem can challenge even a supercomputer. Adleman demonstrated that the billions of molecules in a drop of DNA contained raw computational power that might-just might-overwhelm silicon. But since then, scientists have run into tough practical and theoretical barriers. As Adleman and others in the field have come to realize, there may never be a computer made from DNA that directly rivals today's silicon-based microelectronics.
Through the complete automation of all processes from sample injection to the completion of quantitative reactions, the time required has been greatly shortened, to just six hours. By comparison, the conventional manual process based on the use of microarrays typically takes three days. Fitted with a maximum of 96 wells, each of which can contain up to 100 different DNA strands with abilities to bind to specific DNA sequences, the computer enables a large number of high-precision calculations to be performed simultaneously.
2. Versatile artificial DNA fragments for reactions designed using special software.
The artificial DNA fragments that make up the memory of the DNA computer (that is, the medium that allows computational calculations to be performed) are designed using special proprietary software so that they will have regular physicochemical properties and not interfere each other. Since this makes the so-called hybridization process extremely precise, changes can be made to the computing program performed depending on the composition of the DNA fragments chosen. This makes the computer highly versatile, and capable of being optimized for a wide range of analytical techniques applicable to different diseases, or for the analysis of the genomes of various organisms.
3.Reliability of reactions improved through introduction of Magtration technology.
The reliability of the reactions that underpin the computational abilities of the computer has been greatly improved through the use within the system of Magtration technology, which enables precise control of magnetic beads using specially designed disposable tips and magnets.
Nuclear power is still one of the safest and cleanest ways to produce electricity — regardless of the doomsaying from the public and media after an 8.9-magnitude earthquake nearly caused a meltdown at the Fukushima Daiichi nuclear power plant in Japan.
Nuclear power is not well understood by the general public and the media. So the results of the disaster in Japan have been completely blown out of proportion, to the point that the U.S. government is calling on the president to back off on nuclear power programs for at least a little while.
This is pretty unfortunate, because nuclear power is one of the next best alternatives to fossil fuel-fired plants. Other cleaner power sources, such as solar and wind power, are still in their infancy and are nowhere near as efficient as nuclear reactors.
Japan’s nuclear reactors generate heat through a process called nuclear fission. This happens when uranium atoms collide with other particles — typically a neutral particle called a neutron present in most atoms — and split off into smaller elements. This reaction produces a tremendous amount of heat, which boils the water in the reactor, and several free particles. Neutrons are also among those particles, which then go on to collide with other uranium atoms in the reactor to create more nuclear fission reactions.
This type of reaction is called a chain reaction, because once it begins it creates a cascading effect that can continue for a long period of time. Reactors like the ones in Japan are able to control it by inserting an alternative type of rod that absorbs free neutrons. This lowers the probability of free-floating neutrons colliding with other uranium atoms, which would again create more heat and free-floating particles.
As the water within the reactor boils, it turns into steam. That steam is used to power a turbine that then creates electricity. It’s a much cleaner procedure than a fossil fuel-fired power plant. The nuclear reactor is housed in several containment units, where each serves as a protective layer and a fail-safe for the one before it. Japan’s nuclear reactors featured three containment units, the last of which is designed to “catch” falling nuclear material after a meltdown and keep it from burning its way into the ground.
Several disruptions in external power to the nuclear plant eventually made it difficult to pump clean water into the plant and keep the nuclear fuel cool. The earthquake knocked the nuclear plant off the grid, but it had diesel generators. These were disrupted by the tsunami that followed the earthquake, forcing the plant to go to backup battery power while diesel generators were transported to the plant.
A modification like this is probably going to spark questions about whether it’s too soon to recreate this kind of disaster in a video game without offending anyone. But professional and casual game developers have been using video games as a medium to pay homage to lives lost in disasters or as a tribute to individuals for about as long as they have been to create custom modifications of popular games. The ruins are an addition — or mod — of the original game, which featured destroyed landmarks like the Washington Monument and the Lincoln Memorial.
Games like Fallout 3 and BioWare’s Star Wars epic, Knights of the Old Republic, usually end up creating massive communities that create modified versions of the game because they are so open-ended. That means it’s easy to create new content for the games, which typically ends up generating more publicity for the game because many of the mods are major improvements over the original game or are very well written. Some of them are also controversial — but the same is true for just about any storytelling medium. However, modifications are typically restricted to PC versions of games because they are easier to develop, limiting their audience.
A 9.0-magnitude quake struck off the northeast coast of Japan and spawned a massive tsunami that exceeded the damage threshold of the Japan’s nuclear power plants — including the Fukushima Daiichi nuclear power plant. The quake cut off power to the plants, and the tsunami that followed the earthquake destroyed diesel-powered generators that were providing backup power to the plant — meaning there was no clean water pumping into the reactor to keep the fuel rods cool. That set off a chain of events that led to reports of leaking radiation.
All should have welcomed handing over the cases related to any kind of terror to NIA. Who cares? Anyone belonging to any colour, if found violating the Constitution should be brought to book. The best statement on it came from RSS stalwart and an icon of serving the destitute and the disadvantaged, Bhayyaji Joshi, who assured all help to the government to have such cases investigated. But the state power had some other ideas.
Was the real intention of a government that lies to the nation on WikiLeaks cables and survives, as Arun Jaitley put it aptly, on a political sin, honest?
This government facilitates traitors as simply as that. And punishes patriots in the hope that it would get some Muslim votes.
Look how a secessionist Geelani is facilitated in Delhi, given a platform to demand India's second partition and then allowed to stay on at the expense of Indians to participate in Pakistan Day, at the house of Pakistan's high commissioner in Delhi.
Afzal’s hanging is delayed deliberately to ensure Muslim votes. WikiLeaks cables, sent to Washington by American diplomats, corroborate what every sane Indian believes.
So is the case of handing over cases involving one set of people. The government of Lilliputians wants to prove something that must fetch it some Muslim votes.
They never tried to send the cases of ULFA, or NSCN, or Geelani-Arundhati Roy, or stone pelters of the valley who attacked the security personnel, to NIA. Never pursued the wealth looters who stashed their black money in Swiss banks.
That would have not fetched them what they wanted.
They treated Gujarat as an enemy country, mocked at its investment claims, as if money poring into Gujarat was meant for Pakistan. And now MP is on their list of assaults for obvious reasons.
One of their leaders shows a chestful of currency notes to a foreign diplomat. Nothing happens and the Prime Minister of the nation tries to obfuscate the issue.
Even Berlusconi appears more honest than our ruling elite.
A news story emanating from Srinagar, sent by a national news agency, said that there is an “allegation” that a Hindu temple has been ransacked and taken over by a mafia and a Hindu organization has demanded a CBI probe into that. Oh, too obliged that someone thought that this is news worth any notice. A brief mention, no name of the organization that demanded a probe, no name of the place where the temple was "allegedly" desecrated and no name of the leader of the Hindus who took up the cause, braving bullets.
Replace the term "Hindu temple" with the name of any other faith's place of worship and see the difference.
It pays to be a non-Hindu in this Hindu-majority nation.
Who is responsible for this sorry state of affairs where taking up a Hindu cause needs enveloping it in a secular parlance?
Where even the supposedly Hindu nationalists are shy of saying the word “Hindu” and a government, administration and the media empires led by those who still wear a Hindu name, feel hesitant to come out in support of justice and fair play, lest they should be “misunderstood” as being communal?
In a situation when temples are desecrated without creating a whimper in the capital and the Prime Minister gleefully hands over small apartments to Hindu refugees in their own independent country without saying a single word of assurance that they would someday go back home and a political opposition, barring a few exceptions keeps mum on the main player of all sinful activities that is tearing apart the society and its core, thanks should be given to a Assange and a Leftist editor, to keep the salt of democracy intact. In such times choosing to publish the cables means braving grave risk to his media empire when most of the brave hearts in media have turned “durbaris”.
Frankly, it may not be the case that the state power has chosen Hindus as its target –every patriot, every honest pursuer of policy and programmes feels let down today. A great nation that boasted of being the knowledge hub of the universe has become a billboard of the most corrupt land, while China has surpassed even the US in manufacturing.
We are nowhere near its economic prowess and military might. From shielding the corrupt and lying to Parliament, all such charges which were unimaginable till recently are flying on the face of our Prime Minister.
The aura is gone and men of straw seem to be holding a fort of sand.
This situation demands self-introspection by the Hindu leaders too. They have turned into mere observers and protesters. The UPA began its journey with the removal of the Savarkar plaque from Port Blair memorial and continued with assaults of the bridge that Rama built, keeping eyes wide shut on Kashmiri Hindus while pursuing a brazenly discriminatory appeasement policy for non-Hindus. If Hindus find themselves at such a receiving end, the blame must be borne by the leaders who claim they are Hindus. The entire babalog fraternity, and the so-called sirens, they are very rich and influential individually but a great failure collectively. They enjoy a power-packed list of devotees. Performing miracles. Running huge chains of colleges and “gau shalas”.
Just ask them what was the last issue they won for the Hindus? Driven by jealousies, hatred for each other, a killing spirit that survives on “unchecked” eavesdropping, and an uncanny intolerance of the intellectual inputs , the Hindus seem to be failing the Hindu cause once again, post-Ayodhya movement.
They chose not to answer the inconvenient issues of caste-based discriminations, keeping a silence on incidences like Mirchpur. They never addressed the issue why in India none of the so-called mainstream newspapers has been able to have a single scheduled caste editor or why no scheduled caste leadership is finding its way up the ladder in administration, industry and in any policy-framing group, in spite of being in a majority within the Hindu population of the country? Ironically except the RSS, none is besieged of the issue.
There are Hindus in the Congress and the DMK and the SP, the BSP too. Where is the concern for any Hindu cause among them?
When an MLA from Pakistan fled to India to protect his religious freedom, who spoke for him? Who supports the issue of taking on the main player of all that’s wrong in politics today? Why the eerie silence? The nation will, one day discuss the most horrendous case of backstabbing in our political life. Targeting Hindus is like targeting the last bastion of liberty and plurality. And it’s not being done by Arabs or Turks, but by India-born Hindus.
The temples and the gods are the same who were there when Karachi, Rawalpindi and Kabul were deserted. The men who had to flee those places leaving behind their gods unattended find their partners in today’s leadership that goes on sermonising on religious channels every morning. Just bubbles.
The same way, our honorable Prime Minister has failed the nation like a failed father. He has missed the bus of courage and forgotten that individuals are smaller than national interest and that history is necessarily very ruthless.
1. Keep the main page name always - index.php (By default execution page )
2. create two folder VIEW and MODEL.
3. VIEW folder contain all the templates only (which in .html extension )
4. MODEL folder contain all data base functions parameter wise (Like insert ,update, select and delete ).
5. For controller no need to create any folder , only one page you need to create , name as index.php , in this page you need to fetch your data from database and to show on via existing template.
Every web site have major 2 things only ,
>> fetch the data from database and
>> show it as template design
PHP is a powerful tool for making dynamic and interactive Web pages.
PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
In our PHP tutorial you will learn about PHP, and how to execute scripts on your server.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
What is PHP?
PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software PHP is free to download and use
/////////////////////////////////////////////////////////////////// What is a PHP File?
PHP files can contain text, HTML tags and scripts
PHP files are returned to the browser as plain HTML
PHP files have a file extension of ".php", ".php3", or ".phtml".
//////////////////////////////////////////////////////////////////// What is MySQL?
MySQL is a database server
MySQL is ideal for both small and large applications
MySQL supports standard SQL
MySQL compiles on a number of platforms
MySQL is free to download and use
PHP + MySQL
PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform).
////////////////////////////////////////////////////////////////////// Why PHP?
PHP runs on different platforms (Windows, Linux, Unix, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP is FREE to download from the official PHP resource: www.php.net
PHP is easy to learn and runs efficiently on the server side.
///////////////////////////////////////////////////////////////////////// Where to Start?
To get access to a web server with PHP support, you can:
Install Apache (or IIS) on your own server, install PHP, and MySQL
Or find a web hosting plan with PHP and MySQL support.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Basic PHP Syntax
A PHP scripting block always starts with . A PHP scripting block can be placed anywhere in the document. On servers with shorthand support enabled you can start a scripting block with . For maximum compatibility, we recommend that you use the standard form ( ?> A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code. Below, we have an example of a simple PHP script which sends the text "Hello World" to the browser: echo "Hello World"; ?> Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another. There are two basic statements to output text with PHP: echo and print. In the example above we have used the echo statement to output the text "Hello World". Note: The file must have a .php extension. If the file has a .html extension, the PHP code will not be executed.
//////////////////////////////////////////////////////////////// Comments in PHP
In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
//This is a comment /* This is a comment block */
?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Variables in PHP
Variables are used for storing values, like text strings, numbers or arrays.
When a variable is declared, it can be used over and over again in your script.
All variables in PHP start with a $ sign symbol.
The correct way of declaring a variable in PHP:
$var_name = value;
New PHP programmers often forget the $ sign at the beginning of the variable. In that case it will not work.
Let's try creating a variable containing a string, and a variable containing a number:
$txt="Hello World!"; $x=16; ?>
//////////////////////////////////////////////////////// Naming Rules for Variables
A variable name must start with a letter or an underscore "_"
A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )
A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString).
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PHP String Variables
A string variable is used to store and manipulate text.
String Variables in PHP
String variables are used for values that contain characters.
In this chapter we are going to look at the most common functions and operators used to manipulate strings in PHP.
After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.
Below, the PHP script assigns the text "Hello World" to a string variable called $txt:
$txt="Hello World"; echo $txt; ?>
The output of the code above will be:
Hello World
Now, lets try to use some different functions and operators to manipulate the string.
The Concatenation Operator
There is only one string operator in PHP.
The concatenation operator (.) is used to put two string values together.
To concatenate two string variables together, use the concatenation operator:
$txt1="Hello World!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
?>
The output of the code above will be:
Hello World! What a nice day!
If we look at the code above you see that we used the concatenation operator two times. This is because we had to insert a third string (a space character), to separate the two strings.
The strlen() function
The strlen() function is used to return the length of a string.
Let's find the length of a string:
echo strlen("Hello world!");
?>
The output of the code above will be:
12
The length of a string is often used in loops or other functions, when it is important to know when the string ends. (i.e. in a loop, we would want to stop the loop after the last character in the string).
The strpos() function
The strpos() function is used to search for character within a string.
If a match is found, this function will return the position of the first match. If no match is found, it will return FALSE.
Let's see if we can find the string "world" in our string:
echo strpos("Hello world!","world");
?>
The output of the code above will be:
6
The position of the string "world" in our string is position 6. The reason that it is 6 (and not 7), is that the first position in the string is 0, and not 1.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Create database name : user Create a student table
include("config.php");classmysql{function getAllRecord($table){$arr=array();$sql="select * from $table";$result=mysql_query($sql);while($row=mysql_fetch_assoc($result)){$arr[]=$row;}return$arr;}}?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PHP If...Else Statements
Conditional statements are used to perform different actions based on different conditions.
Conditional Statements
Very often when you write code, you want to perform different actions for different decisions.
You can use conditional statements in your code to do this.
In PHP we have the following conditional statements:
if statement - use this statement to execute some code only if a specified condition is true
if...else statement - use this statement to execute some code if a condition is true and another code if the condition is false
if...elseif....else statement - use this statement to select one of several blocks of code to be executed
switch statement - use this statement to select one of many blocks of code to be executed
The if Statement
Use the if statement to execute some code only if a specified condition is true.
Syntax
if (condition) code to be executed if condition is true;
The following example will output "Have a nice weekend!" if the current day is Friday:
$d=date("D");
if ($d=="Fri") echo "Have a nice weekend!";
?>
Notice that there is no ..else.. in this syntax. The code is executed only if the specified condition is true.
The if...else Statement
Use the if....else statement to execute some code if a condition is true and another code if a condition is false.
Syntax
if (condition)
code to be executed if condition is true;
else
code to be executed if condition is false;
Example
The following example will output "Have a nice weekend!" if the current day is Friday, otherwise it will output "Have a nice day!":
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
else
echo "Have a nice day!";
?>
If more than one line should be executed if a condition is true/false, the lines should be enclosed within curly braces:
$d=date("D");
if ($d=="Fri")
{
echo "Hello!
";
echo "Have a nice weekend!";
echo "See you on Monday!";
}
?>
The if...elseif....else Statement
Use the if....elseif...else statement to select one of several blocks of code to be executed.
Syntax
if (condition)
code to be executed if condition is true;
elseif (condition)
code to be executed if condition is true;
else
code to be executed if condition is false;
Example
The following example will output "Have a nice weekend!" if the current day is Friday, and "Have a nice Sunday!" if the current day is Sunday. Otherwise it will output "Have a nice day!":
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
elseif ($d=="Sun")
echo "Have a nice Sunday!";
else
echo "Have a nice day!";
?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// The PHP Switch Statement
Use the switch statement to select one of many blocks of code to be executed.
Syntax:-
switch (n)
{
case label1:
code to be executed if n=label1;
break;
case label2:
code to be executed if n=label2;
break;
default:
code to be executed if n is different from both label1 and label2;
}
This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared with the values for each case in the structure. If there is a match, the block of code associated with that case is executed. Use break to prevent the code from running into the next case automatically. The default statement is used if no match is found.
Example
switch ($x)
{
case 1:
echo "Number 1";
break;
case 2:
echo "Number 2";
break;
case 3:
echo "Number 3";
break;
default:
echo "No number between 1 and 3";
}
?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PHP Arrays
An array stores multiple values in one single variable.
What is an Array?
A variable is a storage area holding a number or text. The problem is, a variable will hold only one value.
An array is a special variable, which can store multiple values in one single variable.
If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:
$cars1="Saab";
$cars2="Volvo";
$cars3="BMW";
However, what if you want to loop through the cars and find a specific one? And what if you had not 3 cars, but 300?
The best solution here is to use an array!
An array can hold all your variable values under a single name. And you can access the values by referring to the array name.
Each element in the array has its own index so that it can be easily accessed.
In PHP, there are three kind of arrays:
Numeric array - An array with a numeric index
Associative array - An array where each ID key is associated with a value
Multidimensional array - An array containing one or more arrays
////////////////////////////////
Numeric Arrays
A numeric array stores each array element with a numeric index.
There are two methods to create a numeric array.
1. In the following example the index are automatically assigned (the index starts at 0):
$cars=array("Saab","Volvo","BMW","Toyota");
2. In the following example we assign the index manually:
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";
Example
In the following example you access the variable values by referring to the array name and index:
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";
echo $cars[0] . " and " . $cars[1] . " are Swedish cars.";
?>
The code above will output:
Saab and Volvo are Swedish cars.
///////////////////////////////// Associative Arrays
An associative array, each ID key is associated with a value.
When storing data about specific named values, a numerical array is not always the best way to do it.
With associative arrays we can use the values as keys and assign values to them.
Example 1
In this example we use an array to assign ages to the different persons:
$ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34);
Example 2
This example is the same as example 1, but shows a different way of creating the array:
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
The ID keys can be used in a script:
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
echo "Peter is " . $ages['Peter'] . " years old.";
?>
The code above will output:
Peter is 32 years old.
Multidimensional Arrays
In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.
Example
In this example we create a multidimensional array, with automatically assigned ID keys:
$families = array
(
"Griffin"=>array
(
"Peter",
"Lois",
"Megan"
),
"Quagmire"=>array
(
"Glenn"
),
"Brown"=>array
(
"Cleveland",
"Loretta",
"Junior"
)
);
The array above would look like this if written to the output:
Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.
In PHP, we have the following looping statements:
while - loops through a block of code while a specified condition is true
do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
for - loops through a block of code a specified number of times
foreach - loops through a block of code for each element in an array
The while Loop
The while loop executes a block of code while a condition is true.
Syntax
while (condition)
{
code to be executed;
}
Example
The example below defines a loop that starts with i=1. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:
$i=1;
while($i<=5)
{
echo "The number is " . $i . "
";
$i++;
}
?>
Output:
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5
The do...while Statement
The do...while statement will always execute the block of code once, it will then check the condition, and repeat the loop while the condition is true.
Syntax
do
{
code to be executed;
}
while (condition);
Example
The example below defines a loop that starts with i=1. It will then increment i with 1, and write some output. Then the condition is checked, and the loop will continue to run as long as i is less than, or equal to 5:
$i=1;
do
{
$i++;
echo "The number is " . $i . "
";
}
while ($i<=5);
?>
Output:
The number is 2
The number is 3
The number is 4
The number is 5
The number is 6
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// The for Loop
The for loop is used when you know in advance how many times the script should run.
Syntax
for (init; condition; increment)
{
code to be executed;
}
Parameters:
init: Mostly used to set a counter (but can be any code to be executed once at the beginning of the loop)
condition: Evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.
increment: Mostly used to increment a counter (but can be any code to be executed at the end of the loop)
Note: Each of the parameters above can be empty, or have multiple expressions (separated by commas).
Example
The example below defines a loop that starts with i=1. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:
for ($i=1; $i<=5; $i++)
{
echo "The number is " . $i . "
";
}
?>
Output:
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5
The foreach Loop
The foreach loop is used to loop through arrays.
Syntax
foreach ($array as $value)
{
code to be executed;
}
For every loop iteration, the value of the current array element is assigned to $value (and the array pointer is moved by one) - so on the next loop iteration, you'll be looking at the next array value.
Example
The following example demonstrates a loop that will print the values of the given array:
$x=array("one","two","three");
foreach ($x as $value)
{
echo $value . "
";
}
?>
Output:
one
two
three
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PHP Functions
The real power of PHP comes from its functions.
In PHP, there are more than 700 built-in functions.
///////////////////////////////////////////////////////////////// PHP Functions
In this section we will show you how to create your own functions.
To keep the script from being executed when the page loads, you can put it into a function.
A function will be executed by a call to the function.
You may call a function from anywhere within a page.
Create a PHP Function
A function will be executed by a call to the function.
Syntax
function functionName()
{
code to be executed;
}
PHP function guidelines:
Give the function a name that reflects what the function does
The function name can start with a letter or underscore (not a number)
Example
A simple function that writes my name when it is called:
function writeName()
{
echo "Kai Jim Refsnes";
}
echo "My name is ";
writeName();
?>
Output:
My name is Kai Jim Refsnes
PHP Functions - Adding parameters
To add more functionality to a function, we can add parameters. A parameter is just like a variable.
Parameters are specified after the function name, inside the parentheses.
Example 1
The following example will write different first names, but equal last name:
function writeName($fname)
{
echo $fname . " Refsnes.
";
}
echo "My name is ";
writeName("Kai Jim");
echo "My sister's name is ";
writeName("Hege");
echo "My brother's name is ";
writeName("Stale");
?>
Output:
My name is Kai Jim Refsnes.
My sister's name is Hege Refsnes.
My brother's name is Stale Refsnes.
Example 2
The following function has two parameters:
function writeName($fname,$punctuation)
{
echo $fname . " Refsnes" . $punctuation . "
";
}
echo "My name is ";
writeName("Kai Jim",".");
echo "My sister's name is ";
writeName("Hege","!");
echo "My brother's name is ";
writeName("Ståle","?");
?>
Output:
My name is Kai Jim Refsnes.
My sister's name is Hege Refsnes!
My brother's name is Ståle Refsnes?
PHP Functions - Return values
To let a function return a value, use the return statement.
Example
function add($x,$y)
{
$total=$x+$y;
return $total;
}
echo "1 + 16 = " . add(1,16);
?>
Output:
1 + 16 = 17
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PHP Forms and User Input
The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.
PHP Form Handling
The most important thing to notice when dealing with HTML forms and PHP is that any form element in an HTML page will automatically be available to your PHP scripts.
Example
The example below contains an HTML form with two input fields and a submit button:
Name:
When a user fills out the form above and click on the submit button, the form data is sent to a PHP file, called "welcome.php":
"welcome.php" looks like this:
Welcome !
You are years old.
Output could be something like this:
Welcome John!
You are 28 years old.
The PHP $_GET and $_POST functions will be explained in the next section.
Form Validation
User input should be validated on the browser whenever possible (by client scripts). Browser validation is faster and reduces the server load.
You should consider server validation if the user input will be inserted into a database. A good way to validate a form on the server is to post the form to itself, instead of jumping to a different page. The user will then get the error messages on the same page as the form. This makes it easier to discover the error.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// The $_GET Function
The built-in $_GET function is used to collect values from a form sent with method="get".
Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.
Example
When the user clicks the "Submit" button, the URL sent to the server could look something like this:
http://www.w3schools.com/welcome.php?fname=Peter&age=37
The "welcome.php" file can now use the $_GET function to collect form data (the names of the form fields will automatically be the keys in the $_GET array):
Welcome .
You are years old!
When to use method="get"?
When using method="get" in HTML forms, all variable names and values are displayed in the URL.
Note: This method should not be used when sending passwords or other sensitive information!
However, because the variables are displayed in the URL, it is possible to bookmark the page. This can be useful in some cases.
Note: The get method is not suitable for very large variable values. It should not be used with values exceeding 2000 characters.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The $_POST Function
The built-in $_POST function is used to collect values from a form sent with method="post".
Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.
Note: However, there is an 8 Mb max size for the POST method, by default (can be changed by setting the post_max_size in the php.ini file).
Example
When the user clicks the "Submit" button, the URL will look like this:
http://sachinsharmablogspot.com.com/welcome.php
The "welcome.php" file can now use the $_POST function to collect form data (the names of the form fields will automatically be the keys in the $_POST array):
Welcome !
You are years old.
When to use method="post"?
Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.
However, because the variables are not displayed in the URL, it is not possible to bookmark the page.
The PHP $_REQUEST Function
The PHP built-in $_REQUEST function contains the contents of both $_GET, $_POST, and $_COOKIE.
The $_REQUEST function can be used to collect form data sent with both the GET and POST methods.
Example
Welcome !
You are years old.