PHP Interview Question and Answers

1. What is PHP?
 
  • PHP stand for Hypertext Preprocessor.
  • PHP is a Server Side Scripting Language.
  • PHP is a Open Source Software.
  • PHP free to download and use.
  • PHP scripts are executed on server.
  • PHP supports many databases such as MYSQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.,
PHP development began in 1994 when the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called "Personal Home Page Tools" to maintain his personal homepage. Marco Tabini is the funder an publisher of PHP|architech.
 
Lalitha.T, says Mar 24,2014
PHP is a open source programming language. Its is a server side scripting language.some other scripting languages are PERL,PYTHON,ASP.net. PHP used to create dynamic website. It is a development method for better quality and higher reliability.
Kamal, says Dec 07,2013
PHP is a powerful server-side scripting language for creating dynamic and interactive websites.
Your Name Your Email-ID
Your Answer
2. What are the method available in form submitting?
 

GET and POST.

 
Ashish pandey, said August 15, 2017
Get data are transfer through url.
Shalu, said May 06, 2014
Get method is used by default. and it is not secure. but in post method the data is secure and limited. and its accessing speed is feast.
Srinivasulu, said Mar 07,2014
GET method is mostly used for submitting a small amount and less sensitive data.
POST method is mostly used for submitting a large amount or sensitive data.
Your Name Your Email-ID
Your Answer
3. What are the differences between GET and POST methods in form submitting?
  On the server side, the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method.

On the browser side, the difference is that data submitted by the GET method will be displayed in the browser’s address field. Data submitted by the POST method will not be displayed anywhere on the browser.

GET method is mostly used for submitting a small amount and less sensitive data.
POST method is mostly used for submitting a large amount or sensitive data.
 
Your Name Your Email-ID
Your Answer
4. How can we submit from without a submit button?
 

We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit(); function to submit the form.

 
Your Name Your Email-ID
Your Answer
5. How can we get the browser properties using php?
  <?php
echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$browser = get_browser(null, true);
print_r($browser);
?>
 
Your Name Your Email-ID
Your Answer