Saturday, July 20, 2019

HTML Level 1 Freelancer Exam Questions and Answers

1. The _____________ tag is used to create a bulleted list.
  • <list>
  • <ol>
  • <index>
  • <ul>
  • <li>
Answer : <ul>

2. HTML stands for:
  • Homepage Text Maker Language
  • HyperText Markup Language
  • Homepage Tool Making Language
  • HyperText Machine Language
  • Hyperlinked Text Markup Language
Answer: HyperText Markup Language

3. Which of the following form tags was introduced in HTML 5?
  • label
  • legend
  • optgroup
  • output
  • textarea
Answer:  output

4. The <meta> tag should be placed in the ________ section of an HTML page.
  • <body>
  • <base>
  • <head>
  • <footer>
  • <form>
Answer: <head>

5. Which of the following is NOT an attribute of an input element introduced in HTML 5?
  • pattern
  • multiple
  • disabled
  • autocomplete
  • placeholder
Answer:  disabled

6. The top-level container for an HTML document is:
  • <p></p>
  • <footer></footer>
  • <html></html>
  • <body></body>
  • <table></table>
Answer: <html></html>

7. What is the correct tag to display text as formatted in the html document?
  • <format>
  • <print>
  • <pre>
  • <text>
  • <asis>
Answer:  <pre>

8. Which element was not removed by HTML5?
  • <center>
  • <strike>
  • <small>
  • <big>
Answer:  <small>

9. Most HTML editors use __________ to transfer files to and from web servers.
  • HTML
  • HTTP
  • FTP
  • POP
  • SMTP
Answer:  FTP

10. To set a root URL for all links on an HTML page, use the __________ tag.
  • <a>
  • <href>
  • <link>
  • <root>
  • <base>
Answer:  <base>

Friday, July 19, 2019

US English Level 1 Freelancer Exam Questions and Answers

1. Nineteen is an ____ number.
  • strange 
  • odd
  • weird 
  • round
Answer : odd

2. ____I give an order, you should follow it!
  • In case of 
  • where
  • In case 
  • if
  • Because of
Answer : If

3.  Cedric was very——–.
  • erritated
  • irritated
  • iritated
  • earitated
  • irretated
Answer: irritated

4. —– not like you.
  • i’m
  • Am
  • i’re
  • I’m
  • we
Answer: I’m

5. A valley is a low ____ area.
  •   lyeing 
  •   lying 
  •   lie-ing 
  •   laying 
  •   lieing 
Answer : laying

6. You got yourself ____ this mess; get yourself out.
  •   for
  •   at
  •   from
  •   by
  •   into
Answer : into

8. You would —-better off in the other car.
  • never
  • become
  • have been
  • been
  • have
Answer: have been

9. It _____ matter if we stay another day.
  •   don't 
  •   not 
  •   isn't 
  •   won't 
  •   ain't 
Answer : won't

10. A statement should end with a ______.
  •   comma 
  •   question mark 
  •   period 
  •   exclamation mark 
  •   colon
Answer : period

11. She—– three apples.
  • have
  • got
  • is
  • on
  • has
Answer: got

12. We will ________ you to the house.
  •   after 
  •   come at 
  •   behind 
  •   follow 
  •   flow 
Answer : follow

13. At the edge of the trail there was a _____ cliff.
  •   sheared 
  •   sheerly 
  •   shear 
  •   sheerest 
  •   sheer 
Answer : sheer 

14.  —– there any time left?
  • How
  • Were
  • Is
  • is
  • What
Answer: Is

15. You should only take this drug if ____ prescribed by a doctor.
  •   they are 
  •   it 
  •   it's 
  •   when 
  •   its
Answer : it's

16. How—– money do you want to earn?
  • many
  • do
  • few
  • much
  • more
Answer: much

17. I try __ be friendly to my neighbors.
  •   too 
  •   always 
  •   and 
  •   for 
  •   to 
Answer : to

18. Your phone is over—-.
  • there
  • they’re
  • some
  • to
  • their
Answer: there

19. Buckingham ____ is a popular tourist attraction
  •   Palace 
  •   place 
  •   open 
  •   sure 
Answer : Palace 

20. The river is ______ here than I remember.
  •   most wide 
  •   the most wide 
  •   wide 
  •   widest 
  •   wider 
Answer : wider

21. John writes very _____.
  •  best
  •  better
  •  good
  •  much good
  •  well
Answer: well

22. Don't ever do that __________!
  •  hear
  •  not again
  •  again
  •  some more
  •  their
Answer: again

23. Most wines are made _________ grapes.
  •  as
  •  at
  •  into
  •  on
  •  from
Answer: from

24. Our visitor was from ___________.
  •  England
  •  england
  •  far
  •  scotland
  •  their
Answer: England

25. A/an ___________ is most commonly used to indicate a short pause.
  •  colon
  •  comma
  •  apostrophe
  •  period
  •  slash
Answer: comma

26. You _______ drink lots of water.
  •  ever
  •  make
  •  take
  •  will be
  •  should
Answer: should

27. I don't have __________ apples.
  •  any
  •  lots
  •  much
  •  every
  •  no
Answer: any

28. It __________ matter if we stay another day.
  •  ain't
  •  don't
  •  won't
  •  isn't
  •  not
Answer: won't

29. Does anyone ___________ the answer?
  •  found 
  •  has
  •  have known
  •  got
  •  know
Answer: know

30. Be sure you get to school _______ time.
  •  at
  •  by
  •  on
  •  when
  •  all
Answer: on


How to get select the multiple values of drop down or select box in php?

I have a html and php form which you can select multiple values from drop down list.
To select multiple options in a drop-down list, we need to add the "multiple" attribute to <select> element.

For select the multiple option need to hold down below keys for Window and Mac users :
  •  For window - hold down Ctrl key to select more than one option
  •  For mac – hold down Command key to select more than one option

Example: This example create a drop down list using HTML form.

<html>
    <head>
    <title>Multiple Selection</title>
    </head>
    <body>
        <form name = "state" method = "post" action = "states.php"> 
            <h3>Select States</h3> 
            <select name = "states" multiple size = "8">   
               <option value="Maharashtra">Maharashtra</option>
                <option value="Delhi">Delhi</option>
<option value="Goa">Goa</option>
<option value="Gujarat">Gujarat</option>
<option value="Assam">Assam</option>
<option value="Bihar">Bihar</option>
<option value="Punjab">Punjab</option>
<option value="Rajasthan">Rajasthan</option>
            </select> 
            <input type = "submit" name = "submit" value = Submit> 
        </form> 
    </body> 
</html> 

Output : 

Example: This example create a drop down list using PHP and HTML. Please create states.php file.

<html>
    <head>
    <title>Multiple Selection</title>
    </head>

    <?php       
    // Check the form submission
    if(isset($_POST["submit"]))  
    { 
// Check if any option is selected 
if(isset($_POST["states"]))  
{ 
              foreach ($_POST['states'] as $states)  
echo "You selected : $states<br/>"; 
} 
    else
echo "Please select an option first !"; 
    } 
   ?> 

    <body>
        <form name = "state" method = "post" action = "states.php"> 
            <h3>Multiple States</h3> 
            <select name = "states[]" multiple size = "8">   
               <option value="Maharashtra">Maharashtra</option>
                <option value="Delhi">Delhi</option>
<option value="Goa">Goa</option>
<option value="Gujarat">Gujarat</option>
<option value="Assam">Assam</option>
<option value="Bihar">Bihar</option>
<option value="Punjab">Punjab</option>
<option value="Rajasthan">Rajasthan</option>
            </select> 
            <input type = "submit" name = "submit" value = Submit> 
        </form> 
    </body> 
</html> 

Output :



















Please see here is showing your selected multiple options. Thats it !!


Wednesday, July 10, 2019

PHP Level 1 Freelancer Exam Questions and Answers

1. Which function is used to start tracking a user?
Answer: session_start();

2. What is the correct way to add 1 to the $counter variable?
Answer: $counter++;

3. Single-line comments in PHP use the following:
Answer: //

4. Which function checks whether a file or directory exists?
Answer: file_exists function

5. Which statement will skip the rest of the current loop iteration and continue execution at the beginning of next iteration?
Answer: continue

6. What statement will delete session files?
Answer: session_destroy();

7. Which statement can replace several else Statements?
Answer: switch

8. PHP variables start with the symbol?
Answer: $

9. What does cURL stand for?
Answer: Client URL

10. Which file mode will Open a file for read and write?
Answer: w+

11. Which function writes a string to a file?
Answer: file_put_contents

12. $count = $count + 8; can be written as:
Answer: $count += 8;

13. Which of the following functions are used to encrypt passwords?
Answer: md5();

14. How do you write "Hello World 2019" in PHP?
Answer: echo "Hello World 2019";

15. Which operator performs the same function as x=x%y?
Answer: %=

16. What do the initials of PHP stand for?
Answer: PHP: Hypertext Preprocessor.

17. Which function returns (and caches) the owner ID number?
Answer: fileowner()

18. What is the actually used PHP version?
Answer: Version 7.1 or 7.2 is the recommended version of PHP.

19. Which function returns (and caches) the owner ID number?
Answer: fileowner();

20. What function raises the first argument to the power of the second argument, with decimal places to be specified by the scale factor?
Answer: bcpow();

21. Which of the following is correct for adding a comment in a PHP script?
Answer: /* comment */

22. What function is used to convert an argument specifying any base in the range 2 to 36?
Answer:  base_convert();

23. Which function takes a single positive integer argument and seeds the random number operator with it?
Answer:  srand();

24. What term refers to the ability to shorten Extra_Long_Names improving readability of source code?
Answer: Aliasing

25. What PHP operator is used to access methods and properties of objects?
Answer:  -> operator

26. What does MTA stand for?
Answer: Mail Transfer Agent

27. Which of the following allows you to express any real number?
Answer: double

28. Which of the correct way to connect to a MySQL database?
Answer: mysql_connect("localhost");

29. Which statement allows you to end a loop?
Answer: break

30. Which file mode will read and write to the creating a new file?
Answer: a+

31. Which function sets the default scale factor for subsequent BC function calls?
Answer:  bcscale();

32. What PHP function returns the arctangent in radians of a numerical argument?
Answer: atan();

33. Which function returns the version of the server?
Answer: Memcache::getVersion

34. Which PHP operator is used to concatenate strings?
Answer: dot (.) operator

35. Which of the following returns the remainder of $a divided by $b?
Answer: $a % $b

Tuesday, July 9, 2019

How To Create a Popup Login Form Using jQuery ?

Popup login forms are the very good way to present your site without redirecting to Login page. In this posts we will help you how to create popup login form by using jQuery.

Here, we explained how to create popup login form:
  • Login Popup form appear at exact center of screen.
  • Login form appear on click event of a Login button or any link.

Please see below screenshots : 

  • Login button screen



  • Popup Box Screen



For creating a Popup Login Form please takes below steps:-

Step 1 : First create a login HTML or PHP file as per your site.

login.html or login.php

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="login_effect.js"></script>
</head> 
<body>

<h2>Popup Login Form</h2>

<button onclick="document.getElementById('logid').style.display='block'">Login</button>

<div id="logid" class="popup">

  <form name= "login" class="popup-content animate" action="login.php" method="post">
    <div class="popupcontainer">
      <span onclick="document.getElementById('logid').style.display='none'" class="close" title="Close popup">&times;</span>
      <h3>Login</h3>
    </div>

    <div class="container">
      <label for="username">Username</label>
      <input type="text" placeholder="Username" name="username" required>

      <label for="password">Password</label>
      <input type="password" placeholder="Password" name="password" required>
     
      <button type="submit">Login</button><br>
      <label>
        <input type="checkbox" checked="checked" name="remember"> Remember me
      </label>
    </div>

    <div class="container" style="background-color:#F0F0F0">
      <button type="button" onclick="document.getElementById('logid').style.display='none'" class="cbtn">Cancel</button>
    </div>
  </form>
</div>
</body>
</html>


Step 2 : Create a CSS file and define styling for Login Box.

style.css


body {font-family: Arial, Helvetica, sans-serif;}

input[type=text], input[type=password] {
  width: 100%;
  padding: 10px 18px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.popupcontainer {
  text-align: center;
  margin: 20px 0 10px 0;
  position: relative;
}

.container {
  padding: 15px;
}

/* Style for buttons */
button {
  background-color: #3399cc;
  color: white;
  border: none;
  padding: 10px 18px;
  margin: 10px 0;
  cursor: pointer;
}

button:hover {
  opacity: 0.8;
}

.cbtn {
  width: auto;
  padding: 10px 18px;
  background-color: #f44336;
}

/* The popup (background) */
.popup {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding-top: 50px;
}

/* popup Box */
.popup-content {
  background-color: #fefefe;
  margin: 5% auto 15% auto;
  border: 1px solid #ccc;
  width: 50%;
}

span.password {
  float: right;
  padding-top: 15px;
}

/* Style for the Close Button */
.close {
  position: absolute;
  right: 25px;
  top: 0;
  color: #000;
  font-size: 35px;
  font-weight: bold;
}

/* style for Zoom Animation */
.animate {
  -webkit-animation: animatezoom 0.6s;
  animation: animatezoom 0.6s
}

.close:hover,
.close:focus {
  cursor: pointer;

}

Step 3 : Create a Script file to open the popup login form window.

Please use the following script to close the popup window. Its closing by three way like by clicking anywhere outside of the content, by using the "x" button or below "cancel" button to close it.

<script>
// Login form popup
var popup = document.getElementById('logid');
window.onclick = function(event) {
    if (event.target == popup) {
        popup.style.display = "none";
    }
}
</script>


Now its ready Popup Login Form. Thats it.


Thursday, July 4, 2019

How to set minimum order value in opencart?

If you want to set minimum cart order total before anyone can make the checkout.



Please follow the below instructions.

Step 1 : Please open the file path catalog/controller/checkout/checkout.php

Step 2 :  Add this line in your checkout.php controller file.

// To set a mimimum shopping cart value of $1000
if ($this->cart->getSubtotal() > 1000){
$this->session->data['error'] = 'Please note: there is a minimum shopping cart value of 1000 before shipping and tax for you to proceed to checkout.';
$this->response->redirect($this->url->link('checkout/cart'));
}
   
After the below code

if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
     $this->response->redirect($this->url->link('checkout/cart'));
}


Thats it.

Monday, June 24, 2019

How to Manually Back Up MySQL Database and PrestaShop Files

How to Manually Back-Up MySQL Database

MySQL database back-up can be really useful if you are going to upgrade your store, load a new csv file, or just to have in case anything happens to your server. Manually backup is a very good idea and most of the developers do it.

Back up the database

For back up the database you are going to need to login to the cpanel for your site. They are located at cpanel.yourdomain.com or domain.com/cpanel. For login please see below screen.



From this you can login to your cpanel login information refer to the email your host set up when you created your account or email them for asking to the login information. Also sometimes your cpanel login is the same as your ftp login, but that is not always the case. Once you are logged in, look for the phpMyAdmin icon at the bottom under the headings databases. For this please see below screen.



After that click on the icon and your database will be open. Click on the Database menu (located in the upper left corner of the page) that you want to backup from the left column. Please see below screen.




When you click on your database (prestashop) from the left column it will open a view that shows all of the tables in your database. After you click on Export in the top menu. For more information please see below screen.




After that click on Export to see the next screen with two export method.

  • Quick export.
  • Custom export. 

For size limitations and Prestashop 1.6 databases can get large, select custom and press Go button. And then need to select the gzipped option under the  compression, as it is universally supported.



Now press Go button and then your Prestashop database start to download.



When you have a complete backup of your database. If any problems to your site, you will be able to restore your back up database.

How to Manually Back-Up PrestaShop Files via FTP


Back up your website is a necessary step for all users. First things you need to login information to login FTP. When you signed up for your web hosting you should have received an email with FTP information.

However, if your site is very large you'll want to use an FTP client to download your website files instead.  I recommend Filezilla, it is the most popular on these days.
Please see below steps backup your files using the Filezilla FTP client.

  1. Download and Install Filezilla
  2. Use Filezilla to connect to your account


After you have downloaded and installed Filezilla, use login information to connect to your ftp account.
Host : Enter host name (yourdomain.com)
Username : Enter your username here.
Password : Enter your password here.
Port : You can leave the port blank or the default port number is 21.

Please see below ftp account screen to quick connect feature.




 3. Download your files

After you have connected, you can then download your files. First to create new folder "Website Backup". As per the below screens.




After that right click on any of the highlighted public_html directory and click "Download". This will download all of your files / folders to the "Website Backup" folder that we created. Please note that the time it will take to download all of your files will depend on the number of files / folders that you have and how large they are. Please see below screens.




The following time that your files will ever need to be backed up again is if you
  •     Add new products/category to your site.
  •     Install or remove any modules.
  •     Install another template.
  •     Edit your existing template.
  •     Upgrade your shop.
  •     Or any changes to core files.
When customer placing orders or contacting your customer service will not affect the files on your site, all of that information is installed in the database. So if you never do any of the above mentioned things you will only have to back your site up once, which is awesome.

Popular Posts