reset wordpress admin password

forget wordpress admin password. no worry , there is a simple way how to reset wordpress admin password.

cms don’t use plain text to store the password. WordPress stores its password using md5 encryption in mysql database.
Here is some simple steps to reset wordpress admin password from phpmyadmin .

Continue reading “reset wordpress admin password”

Login with facebook and google php script

Login with Facebook and Google is not so much tricky .In this post we will discuss about facebook and google login in php with OAuth2 and at the end of the post you can download the utility( Login with Facebook and Google php script ).login with facebook and google php script free

while i was working on this project i encountered with some errors like:

  • Fatal error: Uncaught exception ‘Google_AuthException’ with message ‘Error fetching OAuth2 access token, message: ‘invalid_grant’
  • Page is not redirect properly during facebook login.

well “Fatal error: Uncaught exception ‘Google_AuthException’” this error was nothing but confliction of google OAuth with facebook login To resolve this we use a two way switch method.
when user login with facebook then we lock Google login and when user login with google then we lock Facebook login.

before Login with Facebook and Google You need to do some task at developer account of facebook and google

At Facebook End

  • Login your facebook.
  • Go To : Facebook Apps.
  • Now create a new apps there, in section Website with Facebook login enter the url where you want the data of Facebook user.
    login with facebook free php script

Now note api key and secret.

At Google end

  • login your google account
  • Go to manage domain
  • Add and verify your domain.after verification your domain will be active.
  • Go to google console.
  • In API Access Menu Create a client id.
  • Now check on web application , Enter your Doman and callback Uri where you want the data of google user.
    login with google phpscript free

Now note api key and secret.

How To Use login with Facebook and Google KIT

  • Open the facebook.config.php
  • Paste your apps id and secret.
require_once dirname(dirname(__FILE__)).'/facebook/facebook.php';

$facebook = new Facebook(array(

'appId' =>'your apps ID',

'secret' => 'App Secret',

'cookie' => true ,


  • For google Login open google.config.php
  • paste your site_name,oauth2_client_id,oauth2_client_secret and oauth2_redirect_uri.
global $apiConfig;
$apiConfig = array(

'site_name' => 'enter your domain name',
'oauth2_client_id' => 'client id',
'oauth2_client_secret' => 'client secret',
'oauth2_redirect_uri' => 'redirect uri',
'use_objects' => false,

for local database setup
edit config.php

$host = "your host";
$data_b ="your database name";
$db_user ="db username";
$db_pwd ="db password";

this Login with facebook and google php script is free and can be integrated with mvc system easily.
Now download for free happy coding.

Live Demo Download

Create Bookmark Link Using Javascript

This post is how to create add to bookmark link for your blog or site
using this link in your site there may be a small increament in your blog with returning visitor.
initialy i found it on prestashop .
you can add a quick “Bookmark this page” link in all your pages so that user can bookmark their favorite pages or articles.
this script supported by IE, Mozilla Firefox and Opera Browsers.

function addBookmark(url, title){
if (!url) {url = window.location}
	if (!title) {title = document.title}
	var browser=navigator.userAgent.toLowerCase();
	if (window.sidebar) { // Mozilla, Firefox, Netscape
		window.sidebar.addPanel(title, url,"");
	} else if( window.external) { // IE or chrome
		if (browser.indexOf('chrome')==-1){ // ie
			window.external.AddFavorite( url, title);
		} else { // chrome
			alert('Please Press CTRL+D (or Command+D for macs) to bookmark this page');
	else if(window.opera && window.print) { // Opera - automatically adds to sidebar if rel=sidebar in the tag
		return true;
	else if (browser.indexOf('konqueror')!=-1) { // Konqueror
		alert('Please press CTRL+B to bookmark this page.');
	else if (browser.indexOf('webkit')!=-1){ // safari
		alert('Please press CTRL+B (or Command+D for macs) to bookmark this page.');
	} else {
		alert('Your browser cannot add bookmarks using this link. Please add this link manually.')

You can call it from html by button or a hyperlink

here i m calling it from a button

Continue reading “Create Bookmark Link Using Javascript”

cascading dropdown using ajax Php and mysql.

dependent dropdown with ajax and php is very common to use script so I create one script for developers cascading dropdown ajax post is about how to create dependent dropdown with jQuery Mysql Php.I have seen there are many tutorial ,but this tutorial is populate dropdown using ajax with xml. In the example we will take 3 dependent dropdown list

Continue reading “cascading dropdown using ajax Php and mysql.”