Posts

Showing posts from October, 2017

AngularJS Tutorial with PHP - Insert Data into Mysql Database

Source Code Database -- -- Table structure for table `tbl_user` -- CREATE TABLE IF NOT EXISTS `tbl_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(200) NOT NULL, `last_name` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ; -- -- Dumping data for table `tbl_user` -- INSERT INTO `tbl_user` (`id`, `first_name`, `last_name`) VALUES (18, 'Mark', 'John'); index.php <!DOCTYPE html> <!-- index.php !--> <html> <head> <title>Webslesson Tutorial | AngularJS Tutorial with PHP - Insert Data into Mysql Database</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> </

AngularJS Tutorial with PHP - Fetch / Select Data from Mysql Database

Source Code Database -- -- Table structure for table `tbl_user` -- CREATE TABLE IF NOT EXISTS `tbl_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(200) NOT NULL, `last_name` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=32 ; -- -- Dumping data for table `tbl_user` -- INSERT INTO `tbl_user` (`id`, `first_name`, `last_name`) VALUES (31, 'Tom', 'Cruze'), (30, 'Bill', 'Gates'), (29, 'John', 'Smith'), (28, 'Big', 'Show'), (27, 'Smith', 'Johnson'), (26, 'The', 'Rock'), (25, 'Peter', 'Parker'), (18, 'Mark', 'John'); index.php <!DOCTYPE html> <!-- index.php !--> <html> <head> <title>Webslesson Tutorial | AngularJS Tutorial with PHP - Fetch / Select Data from Mysql Dat

AngularJS Tutorial with PHP - Delete Mysql Table Data

Source Code <!DOCTYPE html> <!-- index.php !--> <html> <head> <title>Webslesson Tutorial | AngularJS Tutorial with PHP - Delete Mysql Table Data</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> </head> <body> <br /><br /> <div class="container" style="width:500px;"> <h3 align="center">AngularJS Tutorial with PHP - Delete Mysql Table Data</h3> <div ng-app="myapp" ng-controller="usercontroller" ng-init="displayData()"> <label>First Name</label> <input typ

AngularJS Tutorial with PHP - Update / Edit Mysql Table Data

Hello friends in this blog we are going to learn how to update or Edit Mysql table data by using Angular Javascript with PHP script. In previous post we have learn about how to fetch or select data from Mysql database table and display that data on web page without page refresh. But We have move one step ahead like how to edit inserted data by using PHP with Angular Javascript framework. If you have work on any project with Angular Javascipt Framework with PHP and if you work with form data, so at that time you have to required to update data which you have insert into the system, so how to update form data by using Angular Javascript with PHP programming without page refresh event. With help of Angular Javascript directive we can update Mysql table data by using PHP code from back end side operation and we can update data on front end side by using Angular Javascript function without page refresh event. So this is my tutorial on how to update mysql data by using Angular Javascript

How to get value from MySQL with Node.js

Image
Please Share this to your social media if this is useful for you Recommended : New Node.js Example project with Hapi.js.  This time I'd like to share a basic and simple example of CRUD Operation in Node.js and MySQL. Its a lil bit hard to find tutorial Node.js n MySQL as poeple tend to use Mongoose instead of MySQL. LIVE DEMO HERE "note that there's no input  validation  on the Demo, just a crud example" ** UPDATE ** I've created RESTFul Crud example with newest version of express and other dependencies  here Before we start, Please mind the environment of this Application. I'm using Ubuntu NPM, Express  MySQL for Node I haven't tested it yet on Windows. but i bet this will work too. Installing all those things above Install Node.js, NPM and Express in Ubuntu   After your installation's complete, lets start creating your project folder: ubuntu @AcerXtimeline :~ $ express hello_world once your hello_world fold

How to get data from MySQL with AngularJS – PHP

How to get data from MySQL with AngularJS – PHP With only using AngularJS it is not possible to get data from MySQL database because it only handles Client side requests. You have to use any Server side language at backend which handles the request and returns response. In AngularJS   $http   service is use to send AJAX request Contents Table structure Configuration HTML PHP Script Conclusion 1.  Table structure I am using  users  table in the tutorial example. CREATE TABLE `users` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `fname` varchar(80) NOT NULL, `lname` varchar(80) NOT NULL, `username` varchar(80) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 2.  Configuration Create a new  config.php  file. Completed Code <?php $host = "localhost"; /* Host name */ $user = "root"; /* User */ $password = ""; /* Password */ $dbname = "tutorial"; /* Database name */ $con = mysqli_connect($h