Progress Element in HTML5
States of progress bar: A progress bar can be in two states – indeterminate and determinate. 1. Indeterminate Indeterminate state of the progress bar in Chrome 29 on Mac OS 10.8 Based on your combination of browser...
States of progress bar: A progress bar can be in two states – indeterminate and determinate. 1. Indeterminate Indeterminate state of the progress bar in Chrome 29 on Mac OS 10.8 Based on your combination of browser...
What is meant by urlencode and urldocode? Urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode(“10.00%”) will...
How can we encrypt the username and password using php? You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD(“Password”); We can encode data using base64_encode($string) and can decode using base64_decode($string); What are the...
What is meant by nl2br()? Nl2br Inserts HTML line breaks before all newlines in a string string nl2br (string); For example: echo nl2br(“god bless you”) will output “god bless you” to your browser. What...
What is the difference between mysql_fetch_object and mysql_fetch_array? MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array. What is the difference...
What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods? On the server side, the main difference between...
Problem You want to extract the substring preceding or following a particular match. Solution Use the preg_split() function to split the original string into an array delimited by the match term, and then extract...
Problem You want to replace all/some occurrences of a pattern or substring within a string with something else. Solution Use a regular expression in combination with PHP’s str_replace() function (for simple patters): <?php //...
Problem You want to find out how many times a particular pattern occurs in a string. Solution Use PHP’s preg_match_all() function: <?php // define string $html = “I’m <b>tired</b> and so I <b>must</b> go...
Problem You want to search a string for a particular pattern or substring. Solution Use a regular expression with PHP’s ereg() function: <?php // define string $html = “I’m <b>tired</b> and so I <b>must</b>...
into individual words, and then count the occurrences of each word: <?php // define string $str = “baa baa black sheep”; // trim the whitespace at the ends of the string $str = trim($str);...
Most important thing about HTML 5 is that its now no longer part of SGML but its a language of its own. A number of new elements added as well as others removed or...
It’s a common need in web apps: you click something and the text of the thing you just clicked changes. Perhaps something simple like a “Show” button that swaps to “Hide”, or “Expand Description”...
I Write What I Do This blog is a reflection of things that I learn. I use jQuery a bunch. So when I translate things into a tutorial, I do it how I would...
jQuery contains powerful methods for changing and manipulating HTML elements and attributes. jQuery DOM Manipulation One very important part of jQuery is the possibility to manipulate the DOM. jQuery comes with a bunch of...
With jQuery, you can chain together actions/methods. Chaining allows us to run multiple jQuery methods (on the same element) within a single statement. jQuery Method Chaining Until now we have been writing jQuery statements...
A callback function is executed after the current effect is 100% finished. jQuery Callback Functions JavaScript statements are executed line by line. However, with effects, the next line of code can be run even...
jQuery stop() Method The jQuery stop() method is used to stop an animation or effect before it is finished. The stop() method works for all jQuery effect functions, including sliding, fading and custom animations....
jQuery Animations – The animate() Method The jQuery animate() method is used to create custom animations. Syntax: $(selector).animate({params},speed,callback); The required params parameter defines the CSS properties to be animated. The optional speed parameter specifies...
jQuery Fading Methods With jQuery you can fade an element in and out of visibility. jQuery has the following fade methods: fadeIn() fadeOut() fadeToggle() fadeTo() jQuery fadeIn() Method The jQuery fadeIn() method is used...
Wild card domains can be used. Sub domains can be created by first creating a sub directory in the /htdocs folder. E.g. /htdocs/mydomain. Then, the host file needs to be modified to define the...
What is difference between developing website using Java and PHP? Answer In order to make interactive pages, java uses JSP (Java Server pages). PHP is open source while JSP is not. Libraries are much...
CAPTCHA is a test to determine if the user using the system (usually a web form) is a human. It identifies this by throwing challenges to users. Depending on the responses the identification can...
Answer Type Juggling means dealing with a variable type. In PHP a variables type is determined by the context in which it is used. If an integer value is assigned to a variable, it...
How can we increase the execution time of a php script? Answer Default time allowed for the PHP scripts to execute is 30s defined in the php.ini file. The function used is set_time_limit(int seconds)....
IMAP is used for communicate with mail servers. It has a number of functions. Few of them are listed below: Imap_alerts – Returns all the imap errors occurred Imap_body – Reads the message body...
A form data can be posted or submitted without the button in the following ways: 1. On OnClick event of a label in the form, a JavaScript function can be called to submit the...
What are the different types of errors in PHP? Answer Different types of errors are : E_ERROR: A fatal error that causes script termination E_WARNING: Run-time warning that does not cause script termination E_PARSE:...