This post explains you about php login with ajax. In this example, first of all we will validate the user details using ajax library and showing the appropriate result. If user enter correct detail (ie:- admin/admin in this example)we will be redirected to the “index.php” and if you will try to directly access “index.php” means without entering the user details you will redirected to “login.php”. Download Link Demo Link Sample database design for table name contact. This table contains id (primary key), name and age. CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uname` varchar(50) NOT NULL `password` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) dbConnect.inc.php Contains database connectivity code $mysql_db_hostname = "Host name"; $mysql_db_user = "UserName"; $mysql_db_password = "Password"; $mysql_db_database = "Database Name"; $con = mysql_connect($mysql_db_hostname, $mysql_db_user, ...
Real-Time Web Interface to MQTT using Socket.io and Node.js First, all credit for this tutorial goes to Robert Hekkers Blog . I've altered it slightly to pick up newer versions of the various javascript libraries. If you've followed along with my earlier post , you now have MQTT running on your Raspberry Pi, and an Arduino IoT client that can publish and subscribe to MQTT packets. The next step is developing a real-time web interface that can control your MQTT network. Why Socket.io and Node.js? Web browsers typically operate by pulling data from a server when you click on a link. Servers don't usually keep an open connection to the browsers it has serviced, so if some event happens on the server side, the server cannot push that event to your browser, unless you refresh the page. That's where Socket.io comes in handy. Socket.io maintains an open connection between the server and the browser, which enables the server to push updates to the bro...
In this post i have explain about how to implement New user registration with email verification script. if your using register form in a website, you need to use email verification because it will be reduce spam register user and make sure you will get correct registered user in your website. Live Demo Download Database Create sample table called as 'users' and create below columns that table. CREATE TABLE IF NOT EXISTS `users` ( `id` int ( 11 ) NOT NULL AUTO_INCREMENT, `email` varchar ( 100 ) NOT NULL , `name` varchar ( 250 ) NOT NULL , `password` varchar ( 250 ) NOT NULL , `active_code` varchar ( 300 ) NOT NULL , PRIMARY KEY ( `id` ) ) HTML Create simple form element < html > < body > < form method = "post" > < label > Email * </ label > < input type = "text" name = "email" > < label > Password * ...
Comments
Post a Comment