Posts

Check username availability from database in php using jQuery

Hell Friends here is an example to Check username availability from database in php using jQuery. This will be done with three steps. First create a file " index.php " or whatever you want. Create a " user_availability.php ". Create database named "test" and table named "login". What is jquery? JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. index.php( This is the file from where you will input username ) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Username availability Checking using jQuery</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script src="jquery-1....

Ajax login Form using Moo Tool

Image
Hello Friends I have created an Ajax login application with Moo Tool. What is Moo Tool? MooTools is a  compact ,  modular ,  Object-Oriented  JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write  powerful ,  flexible , and  cross-browser  code with its elegant, well documented, and  coherent API . Some Screen Shots are here of it. This is the main login page. This is the page after logged in by user. If you want download it, please Click here

select all checkboxes in single check

<html> <title> select all checkboxes in single check </title>  <head>  <script language=javascript> checked=false; function checkedAll (form1) {     var aa= document.getElementById('form1');      if (checked == false)           {            checked = true           }         else           {           checked = false           }     for (var i =0; i < aa.elements.length; i++)     {      aa.elements[i].checked = checked;     }       } </script </head>  <body> <form name="form1" meth...

How to do autorefresh using javascript

If you want to refresh your page automatically after loading the page <html> < head> < script type="text/JavaScript"> function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } < /script> < /head> < body onload="JavaScript:timedRefresh(5000);"> This page will refresh every 5 seconds. Here we are using the "onload" event to call our function. We are passing in the value '5000', which equals 5 seconds. < /body> < /html > I f you want to refresh a page " on click ", type the following code as:- < a href="javascript:location.reload(true)" > Refresh this page < /a >

how to use explode function in php

Here is the example to use explode function on an array fetched from database values separated by comma ( , ) and count duplicate values also. First create database " your database" and a table named "blog". Enter some data a:- For first row- insert following data---   Ankit, Om For second row- insert following data---   Ankit, Ajeet, Santosh. After that create a php page and paste following coding and change username, password and database name . <table cellpadding="0" cellspacing="0" class="backcolor" style="border: 1px solid rgb(204, 204, 204);"> <?php mysql_connect('localhost','Username','Password'); mysql_select_db('database_name'); $sql = "select tag from blog"; $result = mysql_query($sql)or die('Error in get blog detail'.mysql_error()); $toTagArray = array(); $i=0; while($tag = mysql_fetch_row($result)){ $TagArray = explode(",", $tag[0]); ...

How to ban an IP address or site name using .htaccess

Ban using IP address. These are sample IP addresses... 42.12.5.34 193.110.145.185 Code For .htaccess: <Limit GET POST> order allow,deny deny from 42.12.5.34 deny from 193.110.145.185 allow from all </Limit> To ban using site name. Do NOT include the "http://www." portion! These are sample site names:... domain.com abc.com ## SITE REFERRER BANNING RewriteEngine on # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} domain\.com [NC,OR] RewriteCond %{HTTP_REFERER} abc\.com [NC] RewriteRule .* - [F]

How to enable right click on site that is disabled

In Fierfox Got to the menu bar, click on Tool menu and go to the "Option" and click here. Click on "content" . Click on "advanced" button. Uncheck the "Disable or replace context menus". Refresh the page , right click will work. In Internet Explorer   Go to "Internet Options"    Click the "Security" tab Click "Custom Level"   S croll down to the "Scripting" section   Set "Active Scripting" to "disable"   Click "Ok" a couple of times.