Q:81 | What is ‘float’ property in CSS? |
||||||
A:81 | The float property sets where an image or a text will appear in another element. | ||||||
Q:82 | What is descendant structure in CSS? |
||||||
A:82 | Descendant selectors are used to select elements that are descendants of another element in the document tree.For example, you may wish to target a specific <em> element on the page, but not all <em> elements. A sample document could contain the following code: <body> The document tree diagram (with the <em> element to be targeted) would be:![]()
Using the following rule you can isolate any <em> element inside a <ul> element, without having to describe the <li> element. If this rule is applied, any <em> element within a <ul> element will be colored blue. However, the <em> element within the <p> will not be colored blue:
|
||||||
Q:83 | What is Child Descendant structure in CSS? |
||||||
A:83 |
Child selectorsA child selector is used to select an element that is a direct child of another element (parent). Child selectors will not select all descendants, only direct children. For example, you may wish to target an <em> that is a direct child of a <div>, but not other <em> elements that are descendants of the <div>. A sample document could contain the following code:
Using the following rule you can target any <em> element that is a child of the <div>. Other <em> elements that are descendants but not direct children of the <div> will not be targeted.
OR div>em { color: blue; } |
||||||
Q:84 | How to create a class in JavaScript? | ||||||
A:84 | Classes can seem off-putting at first, but once you see the point of them, their use can be invaluable.We have already met objects. A computer object is a representation of a real object. For an estate agent the object may be a house, including information about the number of rooms and the price.An estate agent may have a lot of houses available. These houses all have different characteristics, and as objects they all go through the same processes. They are viewed, surveyed and bought, and so on.A full estate agent program would be difficult to demonstrate here, but we can introduce the use of classes.In this example, we have the house class. The house class produces house objects, all with object properties, such as number of rooms and price, and all having access to the same methods, such as sold and bought.
So a class can create objects with a group of properties and methods. JavaScript doesn’t have a keyword specific to class, so we must go back to basics and develop classes in a different way. This isn’t very difficult. Class PropertiesLet us examine a very small estate agent program. <HTML> We define a House function that takes three parameters, rooms, price and garage. The function uses the this keyword to create an object. When we call the House function, we assign the result to our variable, which becomes an object. So, identical code would be: house1=new Object(); We would have to type this in for all houses, which would be very tedious and is why we use the class structure instead. When we display the details for a house, I have introduced the ternary operator, ‘?:’. The ternary operator is a compacted version of: if (garage) str=’a’; else str=’no’; (garage?’a’:’no’) means if garage is true, return ‘a’ else return ‘no’. Using the ternary operator removes a line of code, and avoids having to create a new variable. Class MethodsThe House class we have so far defined only contains object properties. We could add a method to replace the document.write() action we used before. (See example) <HTML> Much better! Note how we must add another property, name, so that we can identify the house in question. This offers more flexibility than re-using the variable name, and the variable name is inaccessible anyway, i.e. it is very difficult, if not impossible, to get the view() function to use the string ‘house1’. |
||||||
Q:85 | Are namespaces are there in JavaScript? |
||||||
A:81 | A namespace is a container and allows you to bundle up all your functionality using a unique name. In JavaScript, a namespace is really just an object that you’ve attached all further methods, properties and objects. But it is not always necessary to use namespace. | ||||||
Q:86 | What is JSON? What are the notations used in JSON? | ||||||
A:86 | JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition – December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. | ||||||
Q:87 | How to get Query String in PHP for http request? |
||||||
A:87 | $_GET[] and $_REQUEST[] | ||||||
Q:88 | How to get the http Request in PHP? | ||||||
A:88 | When PHP is used on a Web server to handle a HTTP request, it converts information submitted in the HTTP request as predefined variables:
|
||||||
Q:89 | How you provide security for PHP application? |
||||||
A:89 | There are many ways to accomplish the security tasks but the most common 7 ways are1. Validate Input. Never trust your user and always filter input before taking it to any operation.2. Provide access control.3. Session ID protection4. preventing Cross Site Scripting (XSS) flaws
5. SQL injection vulnerabilities. 6. Turning off error reporting and exposing to the site for hackers. Instead use log file to catch exceptions 7. Effective Data handling |
||||||
Q:90 | What is SQL Injection in PHP security? |
||||||
A:90 | SQL injection attacks are extremely simple to defend against, but many applications are still vulnerable. Consider the following SQL statement:
This query is constructed with $_POST, which should immediately look suspicious. Assume that this query is creating a new account. The user provides a desired username and an email address. The registration application generates a temporary password and emails it to the user to verify the email address. Imagine that the user enters the following as a username:
This certainly doesn’t look like a valid username, but with no data filtering in place, the application can’t tell. If a valid email address is given (shiflett@php.net, for example), and 1234 is what the application generates for the password, the SQL statement becomes the following:
Rather than the intended action of creating a single account (good_guy) with a valid email address, the application has been tricked into creating two accounts, and the user supplied every detail of the bad_guy account. While this particular example might not seem so harmful, it should be clear that worse things could happen once an attacker can make modifications to your SQL statements. For example, depending on the database you are using, it might be possible to send multiple queries to the database server in a single call. Thus, a user can potentially terminate the existing query with a semicolon and follow this with a query of the user’s choosing. MySQL, until recently, does not allow multiple queries, so this particular risk is mitigated. Newer versions of MySQL allow multiple queries, but the corresponding PHP extension (ext/mysqli) requires that you use a separate function if you want to send multiple queries (mysqli_multi_query() instead of mysqli_query()). Only allowing a single query is safer, because it limits what an attacker can potentially do. Protecting against SQL injection is easy:
|
||||||
Q:91 | What is cross site Scripting? |
||||||
A:91 | To understand what Cross Site Scripting is, let’s see a usual situation, common to many sites. Let’s say we are taking some information passed in on a querystring (the string after the (?) character within a URL), with the purpose of displaying the content of a variable, for example, the visitor’s name: http://www.yourdomain.com/welcomedir/welcomepage.php?name=John As we can see in this simple querystring, we are passing the visitor’s name as a parameter in the URL, and then displaying it on our “welcomepage.php” page with the following PHP code: <?php echo ‘Welcome to our site ’ . stripslashes($_GET[‘name’]); ?> echo ‘Welcome to our site ‘ . ?> Very ugly stuff, right? That’s a simple example of the Cross Site Scripting vulnerability. This means that any pasted JavaScript code into the URL will be executed happily with no complaints at all. |
||||||
Q:92 | Which method do you follow to get a record from a million records? (Searching, …. not from database, from an array in php) |
||||||
A:92 | use array_search(), array_keys(), array_values(), array_key_exists(), and in_array(). | ||||||
Q:93 | Which sorting method is lowest time consumable? |
||||||
A:93 | HeapSort, Merge sort are the lowest time consumable sorting algorithm.![]() |
||||||
Q:94 | Which sorting method is lowest memory consumable? |
||||||
A:94 | ![]() |
hai
Hi there,
i’m happy to meet you with this perfect paper,
i try to translate these mysql tips to my own site java.name.tr
mysql and php are the most popular development scripting language and db so that these papers are popular in my country, too.
Thanks,
Kenan KARA
Questions are superb.
They are very clear.
Thanks
Sudha
hi
This information are like God .
you did a grate job sir.. i ‘m proud about you by helping people like me,
nice work… and very thankful to you…
regards
Unnikrishnan K
hi ,
this information is fabulous.its very excellent for interviewers who seek help in such kind of questions.u did agreat job to provide such help.these are the most common n popular question which are asked in interviews.also these ans n ques clear the confusions.
Thanks and Regards
Shipra Dhadwal
niCe tO sTudy..
sO Nice MaTeriaLs…Tnkz a Lot…bOOleandreaMzzzz
Thanks a lot for providing PHP MySQL Interview question with answer
How can we print selected portion of text from html page ?more details about printing information from HTML pages pls?
ASAK
Mizan bhai
I am very nuch pleased toview ur profile …
How many ways we can redirect from one page to another page in php..I know the one by header(Location:filename);
what are the other ways..
Pls reply soon…
Hello Rahman can you suggest me some good books for RDBMS. It will be very helpful for me.
Really superb, dude! Gr8 job…
really very good
our way to beautiful gir. Ulf Raharjo.
Very helpful Thanks a lot…
There is some problem in the site… The right side characters are not visible. Some characters from right side is truncated on each line…
Please check it.
cooooooooooooooooool….thats really a good collection.
and then i came out, mommy move me down sout. Gautam Asaf.
Hi, Very interesting tutorial indeed, Can I have your gmail account for some questions (About Mediawiki)?
hello,
its very informative and very much helpful to my interviews.
i’ll also send more questions to you.
thank you.
Thaks for the wonderful questionnaires. I Will realy Appreciate with this task.
Real Good
Very good……..
hai Mizan
ur idea was very good It will be more helpful for those people who are attending the interviews.
ur interview questions was almost exactly same which most companies ask in written test exams.
ya it is prity good enough but need to some modification please develope more question related real issues in php
It is really superB.
nice work ,
Hello! there
You did a fantastic job. You almost made my day!
Now that i have all these questions, i can easily prepare for my interviews as well as practically perform everything in php.
Thanks a lot for this stuff…
hey freind
thanks its really help full to get the job in reputed company mainly every where every inteviewer ask these type of question thx for helping very one.
vinod kumar
Gud Work done,..:)
Hi, Good job, but the text in your content area is hidden a bit by the menu.
really it’s a good job has done by u as well as u overcome lot of problem of job seekers of php stream.
PLEASE SEND YOUR EMAIL ID TO ASK QUESTION
PLEASE SEND YOUR EMAIL ID TO ASK QUESTION
I AM WAITING
hi,
I am a fresher in php and you have help me alot
i am an Indian.
thanks alot
hello
really this is a grate resource hats off to you.do you have biggner’s tutorial in cakephp.
regrads
kishore
Nice question for interview.
Please advice more on this
Thanks
Shubhangi
These questions are very useful to from freshers to experienced persons.
thank to every one who provides all these information.
From U r Nani(praveen)
really this is the great thing.so much of useful for interview purpose
execelent questions and answers,post me questions for answes
Really appreciated
Nicely done
Tnx man
goood job …………………….
thanks
Faced this questions at company interviews……
Sir,
I have got very useful information from your site.
Thanks for that
Hi
Good collection . Keep it continue……………..
Thanks
Shive Prakash
this is realy very usefull information …… thanks
i am very thankful to you by providing such
a nice collection of php-mysql question
which helped me a lot during my interview .
Thanks for this paper.
Hi,
Thanks for the superb work.
It really help us to clear up the things 🙂
Keep it up and let me know if you required any help from me. I am a PHP and Joomla Developer.
Regards,
Ravi
please give me the answer ……………………
The right side characters are not visible. Some characters from right side is truncated on each line…
Please check it.
hi! thans 4 providing this material
Hi,
This is realy useful information and i like this information.
i hope your information is useful to my interview.
Keep it continue………….
Hi,
Nice work!
Some chars on right are truncated, not visible. Fix that!
Thanks
hi
i read all 94 questions and find lots of knowledge. thanks.
i am the beginner in php still studying php so it will be quite helpful to me .
i hope you will provide the useful knowledge of php more and more .
bye
how can I send a large number of emails ( say 10000 ) from a php script at a time ?
Great job.It covers all the important questions.You have given the answers too.Really admirable job.
Thanks u very much…
its a very usefull information
thank u sir,i have one year exp in php,then i am searching job in php,please post LAMP questions and answers and cake php..
You’ve wrote a very good blog post.
If it’s fine with you, I would like to request permission to use your article as it relates to my topic. I will be happy to negotiate to pay you or hire you for this.
With Regards from
Republic Polytechnic
Nice questions and answers brother!!
Hi
I really thank you to post this questions and i hope this questions will help full to beginners ….
Keep on continue
All these are what i needed!!!!!!!!!!!!!!!!!!
Good work Bro.
Real Good
Hi,
I want mysql Query for finding heighest salary &3 rd heihest salary
Please provide me such query?
superb site..very usefull
these question and answer so Valuable for me.
Here soursh banerjee
I want get more knowledge in PHP
What is the difference print and echo
wow….excellent effort..thx
really good stuff guys
Hello everyone. Who knows where to get latches?..It should be
excellent work.
Please visit this website for Interview Question Answers
http://www.aired.in/2010/12/interview-questions-answers-collection.html
Nice information it is very useful
Hi..
Thanks For all the Questions & Answers.. Its a great stuff for interview preparation.
really it is a great effort thanx alot
This is really a good stuff .
Assalamo alaykum,……
I m going to attend my first interview. I have too much intrest in php but unfortunately i dont’t have anyone to guide me regarding php.as i dont have any practical experience in php… can u plz help me to learn php as well….