Type Of Juggle In PHP
Type Juggling means dealing with a
variable type. In PHP a variables type is determined by the context in which it
is used. If an integer value is assigned to a variable, it becomes an integer.
E.g. $var3= $var1 + $var2
Here, if $var1 is an integer. $var2 and $var3 will also be treated as
integers.
Difference Between Include And Require
Require () and include () are the same with respect to handling
failures. However, require () results in a fatal error and does not allow the
processing of the page. i.e. include will allow the script to continue.
How To Submit Form Without A Submit Button
A form data can be posted or submitted without the button in the following
ways:
1. On OnClick event of a label in the form, a JavaScript function can
be called to submit the form.
E.g. document.form_name.submit()
2. Using a Hyperlink: On clicking the link, JavaScript function can be
called.
E.g <a.href=” javascript:document.MyForm.submit();">
Urlencode And Urldecode
Urlencode can be used to encode a string that can be used in a url. It
encodes the same way posted data from web page is encoded. It returns the
encoded string.
Syntax: urlencode (string $str )
Urldecode can be used to decode a string. Decodes any %##
encoding in the given string (Inserted by urlencode)
Syntax: urldecode (string $str )
Differences Between Require And Include, Include_Once
Include () will include the file specified.
Include_once () will include the file only once even if the code of
the file has been included before.
Require () and include () are the same with respect to handling
failures. However, require () results in a fatal error and does not allow the
processing of the page.
0 comments:
Post a Comment