* You are viewing the archive for the ‘PHP Interview Questions’ Category

PHP Interview Questions-Answers Part-III

Questions : 51 List out some tools through which we can draw E-R diagrams for mysql.
Answer : 51 Case Studio
Smart Draw

Questions : 52 How can I retrieve values from one database server and store them in other database server using PHP?
Answer : 52 we can always fetch from one database and rewrite to another. here is a nice solution of it.
$db1 = mysql_connect(“host”,”user”,”pwd”);
mysql_select_db(“db1″, $db1);
$res1 = mysql_query(“query”,$db1);
$db2 = mysql_connect(“host”,”user”,”pwd”);
mysql_select_db(“db2″, $db2);
$res2 = mysql_query(“query”,$db2);
At this point you can only fetch records from you previous ResultSet,
i.e $res1  But you cannot execute new query in $db1, even if you supply the link as because the … Continue Reading

PHP Interview Questions-Answers Part-II

Questions : 26 What are the different types of errors in PHP?
Answer : 26 Three are three types of errors:
1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script for example, accessing a variable that has not yet been defined. By default,
such errors are not displayed to the user at all although, as you will see, you can change this default behavior.
2. Warnings: These are more serious errors for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.
3. … Continue Reading

PHP Interview Questions-Answers Part-I

Questions : 1 Who is the father of PHP ?
Answers : 1 Rasmus Lerdorf is known as the father of PHP.

Questions : 2 What is the difference between $name and $$name?
Answers : 2 $name is variable where as $$name is reference variable
like $name=sonia and $$name=singh so $sonia value is singh.

Questions : 3 How can we submit a form without a submit button?
Answer : 3 Java script submit() function is used for submit form without submit button
on click call document.formname.submit()

Questions : 4 In how many ways we can retrieve the data in … Continue Reading