In: Computer Science
PHP
1. What is an “all-in-one” form and when should it be used?
2. When would you use the $_SERVER['SCRIPT_NAME'] autoglobal?
Question No 1:
All-in-One Form:
All in one form collects and join together all the components that are related to your application to a single PHP file. There is a function called c.isset() it can be used to determine if data has been submitted to an All in One form.
When should it be used:
We can use All-In-One Form in situation like when we
are trying to collect information or processing information we can
take an example of sending an email. Sending/ Receiving an email or
filling a form etc.
Question No 2:
Autoglobal are associative arrays or predefined global arrays it
contains information about server and execution enviornment They
are used to refer global version of variables from inside a
function.
$_SERVER is a PHP global variables they can be accessed from any
file class or a function.
[SCRIPT_NAME] is basically the current script's path in which you
are working on the are used for webpages that are needed to point
themselves.
We use it when we want to know the name of the server which the
current script is executing
IF YOU HAVE ANY QUERY PLEASE COMMENT DOWN BELOW
PLEASE GIVE A THUMBS UP