Load Infinite Data while Scrolling Page Down in jQuery, AJAX ,PHP AND MYSQL

Ajax, Databases, PHP Scripts
This excercise about my top choice put Dzone like information stacking while page scrolling down with jquery and Php. We have heaps of information however can't show all. This script encourages you to showcase small information and make quicker your site. Investigate live demo and span down. Database Table CREATE TABLE messages( mes_id INT PRIMARY KEY AUTO_INCREMENT, msg TEXT); Browser Capability : Safari, Firefox, IE, Chrome load_data.php When we are scrolling down a webpage, the script($(window).scroll) finds that you are at the bottom and calls the last_msg_funtion(). Take a look at $.post("") eg:$.post("load_data.php?action=get&last_msg_id=35") <?php include('config.php'); $last_msg_id=$_GET['last_msg_id']; $action=$_GET['action']; if($action <> "get") { ?> http://jquery.js $(document).ready(function() { function last_msg_funtion() { var ID=$(".message_box:last").attr("id"); $('div#last_msg_loader').html(''); $.post("load_data.php?action=get&last_msg_id="+ID, function(data){ if (data != "") { $(".message_box:last").after(data); } $('div#last_msg_loader').empty(); }); }; $(window).scroll(function(){ if ($(window).scrollTop() == $(document).height() - $(window).height()){…
Read More

Ajax Polling/Voting System with jQuery, Ajax, PHP and MySQL

Ajax, Databases, PHP, Tutorials
Surveying framework or Voting framework is extremely regular in sites. Voting could be about your website or site or some other thing simply to get the client consideration and get your thought regarding your item. Database Structure Copy this db structure as it is and paste in your mysql window. CREATE TABLE IF NOT EXISTS `polling` ( `id` int(11) NOT NULL AUTO_INCREMENT, `liked` int(11) NOT NULL, `dislike` int(11) NOT NULL, `average` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Dumping data for table `polling` -- INSERT INTO `polling` (`id`, `liked`, `dislike`, `average`) VALUES (1, 1, 1, 1); CREATE TABLE IF NOT EXISTS `polling_ip` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userip` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; JQUERY CODE…
Read More

PHP AND MySQL to create : registration with email verification and login

Databases, PHP
Have you ever registered on a website and you were required to activate your newly created account via a confirmation link sent to the email address you supplied while registering? This Email verification “Mechanism” is very common nowadays especially in forums, popular websites such as ebay, paypal, Facebook etc .Verifying Email Address helps to reduce spam and also to make sure that the email supplied belongs to that member. WHAT ARE WE GOING TO BUILD ? We are going to build a small system in which a user can register a new account. After registration, a confirmation link will be emailed to the email supplied in the registration form. The user will have to log in his email Account and click the activation link. After that, He or she or…
Read More

jQuery ,MYSQL and PHP to create : Facebook like photo gallery with comments

Databases, PHP, PHP Scripts, Tutorials
Have you considered own facebook-style photograph gallry framework with remarks? I suppose – yes. Today I made up my psyche to plan it for you. Fundamental thought – when we click at pictures – they popup (ajax) with greater picture at the left and remarks area at the right. All pictures are in the database (mysql). Furthermore, obviously, we will utilize Php to realize our effect. Additionally, our remark framework will anticipate tolerating more than 1 remark for every 10 mins (to dodge spam). Step 1. SQL For our gallery I prepared two SQL tables: first table keeps records of our images. It contains several fields: title, filename, description, time of adding and comments count. Another table keeps comments. So, execute next SQL instructions: 01 CREATE TABLE IF NOT EXISTS…
Read More

Auto suggest with jQuery Ajax and PHP/MYSQL

Ajax, Databases, Tutorials
Begin with Javascript There are two capacities in the piece of code underneath. the first "propose" performs the ajax ask for dependent upon the clients enter into the content field which is passed into the capacity when the capacity is run. We reference the data with the variable 'inputstring'. the primary area of code is a straightforward if proclamation to check if the length of the clients include in the content box is more than 0. Provided that it is we run the ajax ask for to get the record of prescriptions from the database. #country implies the id of the content enter in our shape. You can see that we're including the class "load" to the content info. This is to presentation an enlivened stacking gif to show the…
Read More

Creating Automatic MySQL Database backups

Databases, PHP Scripts
Each database ought to be went down and assuming that you're presently completing it physically you can stop on the grounds that there's a basic result utilizing Php. With this script you can either pass a particular table to reinforcement or decide to reinforcement the entire database. The most effective method to enable The most ideal route to utilize the script underneath is to duplicate the code and put it in an organizer called "database_backups" as appeared. At that point whenever you call the backup.php index it will make a database reinforcement which is archived on your server. I'd propose downloading these database reinforcements occasionally so you have a duplicate saved securely somewhere else incase you lose your hosting. Using CRON Cron is a time-based job scheduler which allows you…
Read More

Country drop down list with php function

Databases, PHP, PHP Scripts, Tutorials
I had a venture as of late that needed the client to select their nation from a drop down record and store the information in a database. It was such a long process setting up the Php switch proclamation that I supposed somebody may find it handy for an activity. The code underneath is a depiction of the switch proclamation I've setup. The download at the lowest part incorporates 238 nations and mainlands. You recently need to store the nation code in the database then call the capacity beneath to furnish a proportional payback name. Download full code from here
Read More

Simple MySQL database access wrapper

Databases, PHP, Tutorials
This class is a basic Mysql database access wrapper. It can: -Establish an association with a given Mysql server host -Execute Sql questions -Retrieve question comes about into exhibits -Retrieve the outcome set number of columns, final embedded identifier or the amount of influenced columns -Check if a database table record exists matching a given condition -Retrieve the amount of records that a table has matching a given condition Below is class: class.php: <?php class WGDB{ public $connection ; public $querycount = 0; public function db() {} public function connect($dbhost, $dbusername, $dbpassword) { $this->connection = mysql_connect($dbhost,$dbusername,$dbpassword); return $this->connection; } public function close() { return mysql_close( $this->connection ); } public function select_db($databasename) { return mysql_select_db($databasename,$this->connection); } public function exist($tablename, $fieldname, $value, $where = false) { $exist = $this->fastfetch("select * from `$tablename` where `$fieldname` = '$value' ".check($where, " $where").""); return check($exist['id'], true, false); } public function count($tablename, $where = false) { $query = $this->query("select * from `$tablename` ".check($where, "where $where").""); return $this->fetchnum($query); } public function query($sql) { $this->querycount++; return mysql_query($sql,$this->connection); } public function fastfetch($sqlcode, $type = MYSQL_BOTH ) { $query = $this->query($sqlcode) ; return $this->fetcharray($query, $type); } public function fetcharray($query, $type = MYSQL_BOTH ) { return mysql_fetch_array($query, $type); } public function fetchassoc($query) { return mysql_fetch_assoc($query); } public function fetchnum($query) { return mysql_num_rows($query); } public function fetchobject($query) { return mysql_fetch_object($query); } public function escape($string) { return mysql_escape_string($string);…
Read More