PHP interview Questions
Q:-21. How can we register the variables into a session?
We can register a simple variable into a session variable by using super global array $_session.
$_SESSION['name'] = "user";
Q:-22. What is the difference between --$variable and $variable-- ?
--$variable is pre decrement and $variable – post decrement.
Q:-23 .How much data we can upload into the database (By default) ?
By Default its size:- 2MB
Q:-24 .Who is the more secure method GET or POST?
Post method is the secure method than GET.
Q:-25.How can we get the browser properties using PHP?
We can get the server properties by using $_SERVER super global array.
Q:-26. What is full name of WAMP, XAMP, and LAMP?
WAMP: Windows Apache MySQL PHP
XAMP: Extensible Apache MySQL PHP
LAMP: Linux Apache MySQL PHP
Q:-27.What is difference between mysql_fetch_array() and mysql_fetch_row()?
mysql_fetch_array() return entire row of mysql database into an indexed array.
mysql_fetch_row() return entire row of mysql database into an associative arrary by default,you can specify the type of array mapping
Q:-28. What is the use of @ symbol in front of mysql_connect()?
The @ symbol inform mysql_connect() that if the database connection failed do nothing. Hence no system error displayed if the connection fails.
Q:-29. Which function is used to connect the mysql database engine?
Mysql_connect() is used to connect the database engine.
Q:-30. Why use mysql_query() in php mysql?
mysql_query is used to execute the mysql query. It accept a variable which was the previously loaded with the query string.