Friday, July 7, 2017

PHP - Programming 2


// Check number---regular or irregular


//This is first file-------   num.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>check Numbers</title>
</head>
<body>
<form action="number.php" method="post">
Please input six number=<input type="text" id="num" name="num"/><br/>
<input type="submit" id="submit" name="submit"/>
</form>
</body>
</html>
//This is Second file------ number.php
<?php
$num=$_POST["num"];
for($i=0; $i<6; $i++)
{
if($num[$i]==($num[$i+1]-1))
{
 $flag=$flag+1;
 if($flag==5)
 {
  echo "Number is regular". "<br/>";
 }
}
else if(($num[$i]-1)==$num[$i+1])
{
    $flag1=$flag1+1;
 if($flag1==5)
 {
  echo "Number is regular". "<br/>";
 }
}
 if($flag<5 && $flag1<5)
 {
  echo "Number is irregular". "<br/>";
 }

?>

Tuesday, July 4, 2017

PHP - Programming 1



//USE OF SELECT OPTION WHICH SHOW VALUE ACCORDING DATABASE

<?php
  include('my_conn.php');
  $my_sql="SELECT *
  FROM login
  WHERE lid =1101";
  $myresult=mysql_query($my_sql);
  
  
   while($row_select=mysql_fetch_array($myresult))
  {
  
    $check=$row_select['lactive'];

  }
//$check="";
?>
<form action="" post="">
    <select  id="lactive" name="lactive">
        <?php
        if($check=="")
        {
            echo '<option  value="">Select..</option>';
            echo '<option  value="YES">YES</option>';
            echo '<option  value="NO">NO</option>';
        }
        else
        {
        if($check=='YES')
        {
                 echo '<option  value="<?=$check;?>">Yes</option>';
                 echo '<option  value="No">No</option>';
        }
        else
        {
               
                echo '<option  value="<?=$check;?>">No</option>';
                echo '<option  value="">Yes</option>';
         }
        }
         ?>
    </select>
    <input type="submit" id="submit" name="submit"/>
</form>

Wednesday, June 21, 2017

Interview Questions for PHP - 5 - Answers



Back- Interview Questions -5

Q1. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
Ans: PHP Interpreter treats numbers beginning with 0 as octal. 

Q2. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
Ans: In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.

Q3. How do I find out the number of parameters passed into function?
Ans: func_num_args() function returns the number of parameters passed in.

Q4. Explain the ternary conditional operator in PHP?
Ans: Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.

Q5. When are you supposed to use endif to end the conditional statement?
Ans: When the original if was followed by : and then the code block without braces.






Tuesday, June 20, 2017

Interview Questions for PHP - 5


  1. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
  2. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
  3. How do I find out the number of parameters passed into a function?
  4. Explain the ternary conditional operator in PHP?
  5. When are you supposed to use endif to end the conditional statement?


Wait for Answers .......Till Next Post.....Interview questions' answers.

click here for answers

Free Download PHP Interview Questions and Answers

Tuesday, May 30, 2017

Answers --- Interview Questions for CSS-5

Back

Q1. How to set an image in background?
Ans. The background image for a page can be set like this.
     
        Example: body{
                                     background-image:url('lion');
                                   }

Q2. What is an image-repeat-effect?
Ans.The background-image property reports and image both horizontally and vertically by default. If the image is repeated only one direction, the background will look better.

Example: body{
                           background-image:url('nature.png');
                            background-repeat:repeat-x;
                           }

Q3. What is use of background position effect?
Ans: Background-position effect is that when using a background image use an image that does not disturb the text.

Example: body{
                            background-image:url('nature.png');
                            background-repeat:no-repeat;
                            background-position:right top;
                          }


Q4. What is a background shorthand property?
Ans: The shorthand property for background is simply "background".

Example: body{
                            background:#ffffff url('nature.png') no-repeat right top
                          }

Q5. What is text transformation?
Ans:The text-transform property is used to specify uppercase and lowercase letters, or capitalize the first letter of each word.

Example: p.uppercase{text-transform:uppercase;}
                p.lowercase{text-transform:lowercase;}
                p.capitalize{text-transform:capitalize;}

Thursday, May 18, 2017

Interview Questions CSS-5

Q1. How to set an image in background?

Q2. What is an image-repeat-effect?

Q3. What is use of background position effect?

Q4. What is a background shorthand property?

Q5. What is text transformation?


Wait for Answers .......Till Next Post.....Interview questions' answers.

Check here for Answer.

Free Download PHP Interview Questions and Answers 

Thursday, March 9, 2017

Answers --- Interview Questions for SQL - 1

Q1. What are SQL functions?
Ans: SQL functions are
  • Execute queries against a database
  • Retrieve data from a database
  • Insert records in a database
  • Update records in database
  • Delete records from a database
  • Create new database
  • Create new tables in a database
  • Create stored procedures in a database
  • Create views in a database
Q2. "SQL is not case sensitive.". Is this statement true or false?
Ans: True

Q3. What is SQL?
Ans: SQL is a structured query language for accessing and manipulating databases. It is an "American National Standards Institute" Standard(ANSI).

Q4. "Some database systems require a semicolon at the end of each SQL statement.". Is this statement true or false?
Ans: True

Q5. What is RDBMS?
Ans: RDBMS stands for Relational Database Management System. A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as invented by E. F. Codd, of IBM's San Jose Research Laboratory.



           

Friday, February 17, 2017

Interview Questions for SQL - 1

Q1. What are SQL functions?

Q2. "SQL is not case sensitive.". Is this statement true or false?

Q3. What is SQL?

Q4. "Some database systems require a semicolon at the end of each SQL statement.". Is this statement true or false?

Q5. What is RDBMS?


Wait for Answers .......Till Next Post.....Interview questions' answers.

Check here for Answer.

Free Download SQL Interview Questions and Answers 


Tuesday, February 14, 2017

Answers --- Interview Questions for CSS-4

Back - Interview Questions for CSS-4


Q1. Answer: Yes, True

Q2. Answer: (b) Horizontal

Q3. Answer: The text- property is property which used to set or remove decorations from text. It is mostly used to remove underlines from links for design purposes.

Example : a { text-decoration:none; }
                  h1 { text-decoration:underline; }
                  h2 { text-decoration:overline; }
                  h3 { text-decoration:line-through; }

Q4. Answer: CSS background properties are used to define the background effects of an element.

CSS properties used for background effects:
  1. background-color
  2. background-image
  3. background-repeat
  4. background-attachment
  5. background-position
Q5. Answer: The background-color property specifies the background color of an element.
The background color of a page is defined in the body selector:

Example:
                   body { background-color:"blue"; }

Monday, February 13, 2017

Interview Questions for CSS-4

Q1. "If you define the color property, you must also define the background-color property.". Is this true or false statement?

Q2. The text-align property is used to set the____________alignment of a text.
       (a) Vertical (b) Horizontal.

Q3. What is use of text decoration property.

Q4. What is use of CSS background.

Q5. How to change background color?

Wait for Answers .......Till Next Post.....Interview questions' answers.

Click Here---Interview questions for CSS -4-  Answers 

Free Download PHP Interview Questions and Answers 

Sunday, February 12, 2017

Interview Questions for CSS-3-Answers

Back To Questions

Q1. Answers: Yes, True

Q2. Answers: The CSS ID is an Id selector which used to specify a style for single, Unique element. It uses with HTML elements and is defined with a "#".

Example:
                #Ehtml
                {
                     text-align:left;
                     color:blue;
                  }

Q3. Answer: Yes, True.

Q4. Answer: The CSS Class is a class selector which used to specify a style for a group of elements. It uses with HTML elements and is defined with a ".".

Examle:
                .center
                {
                    text-align:center;
                  }

Q.5 Answer:  Inline Style Sheet

Monday, January 30, 2017

Interview Questions for CSS - 3

Q1. "Do not start a class name with a number". Is it a true or false statement?

Q2. What is a CSS ID define and use?

Q3. "Do not start an CSS ID name with a number". Is it a true or false statement?

Q4. How to CSS Class define and use?

Q5. Which CSS has the highest priority?
  • Internal Style Sheet
  • Browser Default
  • Inline Style Sheet
  • External Style Sheet

Wait for Answers .......Till Next Post.....Interview questions' answers. 


Free Download PHP Interview Questions and Answers