- Go to command line and type
- > regedit (Press Enter)
- See REGISTRY EDITOR
- Select “HKEY_LOCAL_MACHINE” —> SOFTWARE
- Pick required software
- Delete values from REGISTRY EDITOR
- After completion uninstall software from cPanel
“mysqli” extension is an improvement over the old “mysql” extension. In fact, the “i” in mysqli stands for “improved”.
mysqli was developed to take advantage of the new features available in MySQL since version 4.1.3. Also, you can use it since PHP 5. So, if you code with PHP5 with a newer version of MySQL, it’s strongly recommended for you to use the extension “mysqli” over “mysql”.
SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker).
More serious sql injection attacks
$name_evil = "'; DELETE FROM customers WHERE 1 or username = '";
// our MySQL query builder really should check for injection
$query_evil = "SELECT * FROM customers WHERE username = '$name_evil'";
// the new evil injection query would include a DELETE statement
echo "Injection: " . $query_evil;
injection prevention - mysql_real_escape_string()
//NOTE: you must be connected to the database to use this function! // connect to MySQL $name_bad = "' OR 1'"; $name_bad = mysql_real_escape_string($name_bad); $query_bad = "SELECT * FROM customers WHERE username = '$name_bad'"; echo "Escaped Bad Injection: <br />" . $query_bad . "<br />"; $name_evil = "'; DELETE FROM customers WHERE 1 or username = '"; $name_evil = mysql_real_escape_string($name_evil); $query_evil = "SELECT * FROM customers WHERE usernam
jQuery noConflict()
Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery’s case, $ is just an alias for jQuery, so all functionality is available without using $.
Difference b/w document.ready() & window.load()
$(document).ready
is jQuery
event that is fired when DOM is loaded, so it’s fired when the document structure is ready.
$(window).load
event is fired after whole content (including css, images etc..) is loaded.
DOM
The Document Object Model (DOM) is a programming API for HTML and XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term “document” is used in the broad sense – increasingly, XML is being used as a way of representing many different kinds of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents.
This issue regarding missing ‘content’ region from info file.
if condition in drupal 8
{% if form %}
{{ form }}
{% endif %}
for loop in drupal8
{% set users = [‘Paul’, ‘Guenther’, ‘Max’] %}
{% for user in users %}
{{ user }}
{% endfor %}
Here’s how to turn on Maintenance Mode in Drupal 7:
For drupal6
UPDATE users SET name='admin', pass=md5('drupal') WHERE uid = 1;
For drupal7
define(‘DRUPAL_ROOT’, getcwd());
require_once DRUPAL_ROOT . ‘/includes/bootstrap.inc’;
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once ‘includes/password.inc’;
$pwd = user_hash_password(‘NewPassword‘);
UPDATE users SET name=’admin’, pass=’$pwd’ WHERE uid = 1;