In this exercise I have demonstrate the PHP hashtag conversion system. That system will convert any hast string to clickable link that directly link to hashtag rendering page. I have use regular expression from scrap to build this type of how to convert hash string to click able link. I have received many request from my viewer to make video tutorial on this type of topic. If you have use twitter or Facebook or google plus, on this of social networking site, you have show the link with hash tag, when you have click on that link so at that time you have show the result on string with hash tag on which you have click. If you want to build this type of system you have to watch this video tutorial on convert hash tag string to click able link. This type of feature mostly used in social network site in which you have see that when you have show to link with pound sign and when you click on that type of link you can find more information or result on which you have clicked word. This way you can get more result on your favorite keyword. This type of link mostly put on keyword, so you can find more result on that keyword, this way we can build a social network.
Source Code
index.php
<?php
//index.php
//Title - Make PHP Hashtag system by using Regular Expression
function convertHashtoLink($string)
{
$expression = "/#+([a-zA-Z0-9_]+)/";
$string = preg_replace($expression, '<a href="hashtag.php?tag=$1">$0</a>', $string);
return $string;
}
$string = "#PHP means Hypertext Preprocessor<br />";
$string .= '#mysql is a nice database<br />';
$string .= "#Jquery is a Javascript Library<br />";
//<a href="">PHP</a>
$string = convertHashtoLink($string);
echo $string;
?>
If you want to learn how make html table column sort in ascending order or descending order without page refresh by using Ajax with jquery as front end and as a back end by using PHP and Mysql database. Ajax Column sorting is a aspect of something where user can make sort the html table results into either in ascending or descending order. You are work with large report and many column then at that time you have many time for finding particular data but by using this feature it will be quite simple and you can easily figure out data from large amount of data. In this feature when user click on column name of table then it will be load data according to that column in descending or ascending order. When user click on table column name at that time ajax request will generate and it will send request to server for fetching data according to order of that particular column and server send back html data to the ajax request and it will show on web page without page refresh event. This way Ajax column sort feature work with JQuery PHP and Mysql.
Source Code
Database
--
-- Table structure for table `tbl_employee`
--
CREATE TABLE IF NOT EXISTS `tbl_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`gender` varchar(10) NOT NULL,
`designation` varchar(100) NOT NULL,
`age` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;
--
-- Dumping data for table `tbl_employee`
--
INSERT INTO `tbl_employee` (`id`, `name`, `gender`, `designation`, `age`) VALUES
(1, 'Bruce Tom', 'Male', 'Driver', 36),
(5, 'Clara Gilliam', 'Female', 'Programmer', 24),
(6, 'Barbra K. Hurley', 'Female', 'Service technician', 26),
(7, 'Antonio J. Forbes', 'Male', 'Faller', 32),
(8, 'Charles D. Horst', 'Male', 'Financial investigator', 29),
(9, 'Beau L. Clayton', 'Male', 'Extractive metallurgical engin', 33),
(10, 'Ramona W. Burns', 'Female', 'Electronic typesetting machine operator', 27),
(11, 'Jennifer A. Morrison', 'Female', 'Rigging chaser', 29),
(12, 'Susan M. Juarez', 'Female', 'Control and valve installer', 25),
(13, 'Ellan D. Downie', 'Female', 'Education and training manager', 26),
(14, 'Larry T. Williamson', 'Male', 'Teaching assistant', 30),
(15, 'Lauren M. Reynolds', 'Female', 'Internet developer', 22),
(16, 'Joseph L. Judge', 'Male', 'Refrigeration mechanic', 35),
(17, 'Eric C. Lavelle', 'Male', 'Model', 21),
(18, 'Cheryl T. Smithers', 'Female', 'Personal banker', 23),
(19, 'Tonia J. Diaz', 'Female', 'Facilitator', 29),
(20, 'Stephanie P. Lederman', 'Female', 'Mental health aide', 27),
(21, 'Edward F. Sanchez', 'Male', 'Marine oiler', 28);
If you are looking to search for drag and drop upload multiple files by using JQuery with Ajax with PHP Programming Language without refreshing of web page. For implementing this things I have not use any html file control for upload multiple files but I have use simple html divison tag with drag and drop event of Jquery. In this post we have jQuery event handlers which will be called based on any drag-drop events. When used dropped any type of image files then at that time an AJAX method will be called for execute PHP file for sending dropped images or files to the server. I have explained how to implement drag and drop multiple file upload using jQuery AJAX with php for send file to the server. In this post I have Jquery dragover, dragleave and drop event for checking drop file to division tag. After dropping file I have create one FormData() object and appending files into that FormData() object and that FormData object send to php file via Ajax request. This way dropped files has been sent to the server by using FormData via ajax request. I have not used any jquery plugin for Drag and Drop upload multiples files.
If you are willing to learn how can we generate excel file by using jquery, so this is the right place in which I will learn you how to use jquery with php programming for export of html table data to Excel file. This is my short PHP web development tutorial in which We will talk about how we can use jquery code for export html table data to excel file format by using PHP. In number of web pages in your web application, you want to give one option for generate excel file from your html data table. With the help of this clean php code execute with the help jquery. You can efficiently build the functionality like export any type of html table data to excel file format by using php programming with Jquery. In this PHP web development tutorial first I will fetch data from mysql table and display that table data on the web page in html table and below html table I have put one button for export html table data to excel file. When user click on that button html data will be exported to excel file. I will jquery code on button click event. This code is working on most of the modern browser like a Old and New Internet Explorer, Google Chrome Fire Fox etc. I wish you have something learn from this post.
Source Code
Database
--
-- Table structure for table `tbl_employee`
--
CREATE TABLE IF NOT EXISTS `tbl_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`gender` varchar(10) NOT NULL,
`designation` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;
--
-- Dumping data for table `tbl_employee`
--
INSERT INTO `tbl_employee` (`id`, `name`, `gender`, `designation`) VALUES
(1, 'Bruce Tom', 'Male', 'Driver'),
(5, 'Clara Gilliam', 'Female', 'Programmer'),
(6, 'Barbra K. Hurley', 'Female', 'Service technician'),
(7, 'Antonio J. Forbes', 'Male', 'Faller'),
(8, 'Charles D. Horst', 'Male', 'Financial investigator'),
(9, 'Beau L. Clayton', 'Male', 'Extractive metallurgical engin'),
(10, 'Ramona W. Burns', 'Female', 'Electronic typesetting machine operator'),
(11, 'Jennifer A. Morrison', 'Female', 'Rigging chaser'),
(12, 'Susan M. Juarez', 'Female', 'Control and valve installer'),
(13, 'Ellan D. Downie', 'Female', 'Education and training manager'),
(14, 'Larry T. Williamson', 'Male', 'Teaching assistant'),
(15, 'Lauren M. Reynolds', 'Female', 'Internet developer'),
(16, 'Joseph L. Judge', 'Male', 'Refrigeration mechanic'),
(17, 'Eric C. Lavelle', 'Male', 'Model'),
(18, 'Cheryl T. Smithers', 'Female', 'Personal banker'),
(19, 'Tonia J. Diaz', 'Female', 'Facilitator'),
(20, 'Stephanie P. Lederman', 'Female', 'Mental health aide'),
(21, 'Edward F. Sanchez', 'Male', 'Marine oiler');
In this post we are going to learn how to create ajax pagination without page refresh by using Ajax with Jquery, PHP and Mysql. Ajax Pagination is most helpful to display set of table data with no any page reload event. Inside ajax pagination ajax call will deliver asynchronous manner for that web ajax call will do work coordinate with another ajax call.
In most of the web based application, pagination or pager is a most necessary part where large numbers of data are fetched from the database table. In those type of case, Pagination with Ajax is a excellent style this is because it will relief to develop the User Interface of your web based application. In This post, I will display how can you apply the Ajax pagination in PHP using jQuery and MySQL. I have created the very simple but powerful pagination script to make pagination with jQuery, Ajax, PHP, and MySQL. I have using php and I will fetch the student data from the MySQL database with the pagination links and this pagination links, you can pull the database table data except the visibled data. jQuery and Ajax will be helpful to fetch the data from the database table as per on pagination links without refreshing whole the page. I have describe complete in this video tutorial, you can see the video and learn from this video tutorial how to create pagination by using Ajax with Jquery php and mysql. I have also provide source code here also.
Source Code
Database
--
-- Table structure for table `tbl_student`
--
CREATE TABLE IF NOT EXISTS `tbl_student` (
`student_id` int(11) NOT NULL AUTO_INCREMENT,
`student_name` varchar(250) NOT NULL,
`student_phone` varchar(20) NOT NULL,
PRIMARY KEY (`student_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
--
-- Dumping data for table `tbl_student`
--
INSERT INTO `tbl_student` (`student_id`, `student_name`, `student_phone`) VALUES
(1, 'Pauline S. Rich', '412-735-0224'),
(2, 'Sarah C. White', '320-552-9961'),
(3, 'Samuel L. Leslie', '201-324-8264'),
(4, 'Norma R. Manly', '478-322-4715'),
(5, 'Kimberly R. Castro', '479-966-6788'),
(6, 'Elaine R. Davis', '701-685-8912'),
(7, 'Concepcion S. Gardner', '607-829-8758'),
(8, 'Patricia J. White', '803-789-0429'),
(9, 'Michael M. Bothwell', '214-585-0737'),
(10, 'Ronald C. Vansickle', '630-571-4107'),
(11, 'Clarence A. Rich', '904-459-3747'),
(12, 'Elizabeth W. Peterson', '404-380-9481'),
(13, 'Renee R. Hewitt', '323-350-4973'),
(14, 'John K. Love', '337-229-1983'),
(15, 'Teresa J. Rincon', '216-394-6894'),
(16, 'Erin S. Huckaby', '503-284-8652');
In this PHP Tutorial post we are going to learn how to convert or export html text or file to Microsoft Word File format by using PHP programming Language. If you are develop any web application and in that application you want to add one feature like you want to create Word Document from your PHP Web Application then at that time you can use this PHP Tutorial Script for Export HTML text to Microsoft Word. For this I have create one HTML form with two field for entering heading text and description in html format. In PHP script I have used simple PHP HTTP header() function that sends a raw HTTP header to a client. You can also format the word file from html code by putting simple html tag and you can also use inline stylesheet for change color, increase font size etc. The export of HTML file to Microsoft word document by using PHP script is the highest required functionality. Here in video tutorial, I have describe simple step by step with php coding guidance for beginners, who want to learn how to create Microsoft Word Document(.doc) from HTML file by using php script.
Source Code
index.php
<!DOCTYPE html>
<html>
<head>
<title>Webslesson Tutorial | PHP Script for convert or export HTML text to MS Word File</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
</head>
<body>
<br /><br />
<div class="container" style="width:800px;">
<br />
<h3 align="center">PHP Script for convert or export HTML text to MS Word File</h3>
<br />
<form method="post" action="export.php">
<label>Enter Title</label>
<input type="text" name="heading" class="form-control" />
<br />
<label>Enter Description in HTML Formate</label>
<textarea name="description" class="form-control" rows="10"></textarea>
<br />
<input type="submit" name="create_word" class="btn btn-info" value="Export to Word" />
</form>
</div>
</body>
</html>
In this post we are going to learn how to convert HTML Divison tag to editable html form by using Jquery and save changes of html form data into mysql table by using PHP programming with Ajax Jquery without page refresh. Suppose you work on some application and in this web application you have display data in text form in html divison tag and you do not want to create one more page for update those data into table. So at that time you can use this component. In this when user click on single text data which have select from mysql table and display under html divison tag, this divison tag data will be converted into html form by using Jquery method and user can easily change the form data and save those change data into table by using PHP with Ajax.
For this I have create one form and in that form I have create two divison tag, in one tag I have display text data and this will visible to user. And in second divison tag I have store data into html form element like textbox select box etc. This divison tag form is not visible to user. On visible if user click on first divison tag and by using Jquery show() method we can display this form to user and text divison will be hide by using jquery hide() method. In this tag I have use two button, one for save data and other for cancel. For save data to the mysql database I have use Ajax() method with PHP code for save the form data to the table when user click on save button data will be update to mysql table and form will be hide and text divison tag will be visible to user by using Jquery. Suppose user do not want to change data then he can simply click on cancel button and form will be hide and text divison will be visible to user by using Jquery. This all things I have describe in my video tutorial on php web development which I have attach in this post, so I hope you can learn something new things from this post.
Source Code
tbl_employee
--
-- Table structure for table `tbl_employee`
--
CREATE TABLE IF NOT EXISTS `tbl_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`gender` varchar(10) NOT NULL,
`designation` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `tbl_employee`
--
INSERT INTO `tbl_employee` (`id`, `name`, `gender`, `designation`) VALUES
(1, 'Bruce Tom', 'Male', 'Driver');
In this post we are going to learn how to upload image or file to server using php without page refresh using jquery with ajax and if you want to remove uploaded image from the server using php with jquery ajax without page refresh. Here I have called php upload script via ajax function. In PHP upload script I have select image or file by using html file element and in PHP script I have rename uploaded image or file and by using PHP function like move_uploaded_file() and with help of this function I have upload file or image to folder. For calling php script I have used Jquery Ajax function call. I have used form submit Jquery event and in this I have called Ajax function.
For remove image from server I have also used PHP script for deleting uploaded image from the server. For calling php script I have also used ajax function. By using this Jquery Ajax image will be delete from the server without the page refresh. For delete Image from server, In PHP script I have used unlink() PHP function for removed Image or file from server. This all things I have describe in this my PHP Video Tutorial for web development.
If you want to looking for a making of simple PHP MySQL shopping cart tutorial? Here is the good news for you, here have learn a step by step making of shopping cart and easy to follow this tutorial. In this post we are going to learn how to make a simple PHP shopping cart application. This PHP shopping cart script is purposely kept as simple as possible for beginner php programmer. Here I have to describe how to displaying product list from MySql database. In each displaying product we have given options for entering item quantity and add that item to shopping cart and that shopping cart items will be stored into a session variable and if you want to remove item from shopping cart then you can clear session variable and can removing items from the shopping cart. I have used very simple core php code for creating this simple shopping cart by using get and post methods of php.