Thursday 30 June 2011

How can we submit a form without a submit button?


<html>
<body bgcolor="cornsilk" text= "greeen">
 <h1>abc</h1>
</html>

//then//


 <html>
<body>
<input type="button" name="btn" value= "Show me"onClick="xyz()">
 </body>
<script language= "javascript">
 function xyz()
  { document:location= "abc.html";
  }
  </script>
  </html>

Tuesday 14 June 2011

operator
An operator is a symbol or series of symbols that, when used in conjunction with values, performs an action and usually produces a new value.
operand
An operand is a value used in conjunction with an operator. There are usually two operands to one operator.
Expression
Expression is any combination of functions, values, and operators that resolves to a value. As a rule of thumb, if you can use it as if it were a value, it is an expression.

Constants

Variables offer a flexible way of storing data because you can change their values and the type of data they store at any time. If, however, you want to work with a value that you do not want to alter throughout your script's execution, you can define a constant. You must use PHP's built-in function define() to create a constant. After you have done this, the constant cannot be changed. To use the define() function, you must place the name of the constant and the value you want to give it within the call's parentheses. These values must be separated by a comma, like so:
 
define ("CONSTANT_NAME", 42);
 

The if Statement


An if statement is a way of controlling the execution of a statement that follows it (that is, a single statement or a block of code inside braces). The if statement evaluates an expression between parentheses. If this expression results in a true value, the statement is executed. Otherwise, the statement is skipped entirely. This enables scripts to make decisions based on any number of factors.

What Is a Function?

A function, then, is a self-contained block of code that can be called by your scripts. When called, the function's code is executed. You can pass values to functions, which they then work with. When finished, a function can pass a value back to the calling code.

What Is an Array?

An array enables you to store as many values as you want in the same variable.
Type Specifies
Specifier
Description
d
Displays an argument as a decimal number
b
Displays an integer as a binary number
c
Displays an integer as its ASCII equivalent
f
Displays an integer as a floating-point number (double)
o
Displays an integer as an octal number (base 8)
s
Displays an argument as a string
x
Display an integer as a lowercase hexadecimal number (base 16)
X
Displays an integer as an uppercase hexadecimal number (base 16)


Portability
PHP is designed to run on many operating systems and to cooperate with many servers and databases. You can build for a Unix environment and shift your work to NT without a problem. You can test a project with Personal Web Server and install it on a Unix system running on PHP as an Apache module.
Variables
A variable is a special container you can define to hold a value. Variables are fundamental to programming.
A variable is a holder for a type of data. It can hold numbers, strings of characters, objects, arrays, or booleans. The contents of a variable can be changed at any time.
PHP is loosely typed, which means it calculates data types as data is assigned to each variable.

Six standard data types available in PHP.
          Type                                                              Example                                                  Description
            Integer                                                                                  5                                                                           A whole number
            Double                                                                             3.234                                   A floating-point number
            String                                                                              "hello"                                  A collection of characters
            Boolean                                                                           true                                    One of the special values true or false
           Object                                                                  class Item
                                                                                    { var $name = "item"; }
                                                                                     $obj1 = new Item();
                                                                                    $obj2 = new Item();
                                                                                   $obj1->name = "widget 5442";
                                                                                  print "$obj1->name<br />";
                                                                                 print "$obj2->name<br />";
                                          
           Array                                          $membertypes = array ("regular", "regular", "regular", $regular");                     "Arrays"
Special Data Types
                   Type                                                                                                                                                          Description
            Resource                                                                    Reference to a third-party resource (a database, for example)
            NULL                                                                         An uninitialized variable

PHP Is Open Source

To many people, open source simply means free, which is, of course, a benefit in itself.
Well-maintained open-source projects offer users additional benefits, though. You benefit from an accessible and committed community that offers a wealth of experience in the subject. Chances are that any problem you encounter in your coding can be answered swiftly and easily with a little research. If that fails, a question sent to a mailing list can yield an intelligent, authoritative response.
You also can be sure that bugs will be addressed as they are found, and that new features will be made available as the need is defined. You will not have to wait for the next commercial release before taking advantage of improvements.
There is no vested interest in a particular server product or operating system. You are free to make choices that suit your needs or those of your clients, secure that your code will run whatever you decide.

Speed of Development

Because PHP allows you to separate HTML code from scripted elements, you will notice a significant decrease in development time on many projects. In many instances, you will be able to separate the coding stage of a project from the design and build stages. Not only can this make life easier for you as a programmer, but it also can remove obstacles that stand in the way of effective and flexible design.

Why Choose PHP?


There are some compelling reasons to work with PHP. For many projects, you will find that the production process is significantly faster than you might expect if you are used to working with other scripting languages. At Corrosive we work with both PHP and Java. We choose PHP when we want to see results quickly without sacrificing stability. As an open-source product, PHP is well supported by a talented production team and a committed user community. Furthermore, PHP can be run on all the major operating systems and with most servers.

PHP :- : Hypertext Preprocessor. It is a server-side scripting language often written in an HTML context. Unlike an ordinary HTML page, a PHP script is not sent directly to a client by the server; instead, it is parsed by the PHP engine. HTML elements in the script are left alone, but PHP code is interpreted and executed. PHP code in a script can query databases, create images, read and write files, talk to remote servers—the possibilities are endless. The output from PHP code is combined with the HTML in the script and the result sent to the user.
PHP 5 introduces numerous new features
·       PHP has new integrated for support for XML. The various functions and classes provided to handle XML in different ways all now use the same underlying library (libxml2). This should make XML features more stable and interoperable.
·       The SQLite SQL library is now bundled with PHP, together with all the functions you need to work with it.
·       PHP now supports private and protected methods and properties in classes.
·       PHP supports class constants.
·       Objects passed to functions and methods are now passed by reference. That is, a reference to an object is passed around your script rather than copies of objects. This significantly reduces the likelihood of bugs in object-oriented code.
·       PHP supports static methods and properties, making more advanced object-oriented designs possible.
·       Methods can now be declared to require particular object types.
·       The comparison operator (===) now checks that two references point to the same object. Previously, it was hard to test objects in this way.
·       PHP now supports abstract classes and interfaces.