Read and display the text file using javascript

Welcome back to shortlerner.com, in our previous post we was learn How to Send Attachment With Email with the help of PHP. today in this post we will see how to read and display a text file data into html text area tag with the help of JavaScript.

Read and display the text file using javascript

so here we are creating a file tag where user upload the text file and there is another html form element text area.

so whenever user upload the file we use some JavaScript functions which will read the file and display all the data of the file inside the text area.

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

simply just copy the above code and put it on your root directory.
hope this post will helps you, if you still facing some bugs or error to than feel free to contact.

thanks for reading the post and please share this code with your developer buddy.

keep coding , keep learning

Send Attachment With Email using php

Welcome back to shortlearner.com, in our previous post we learn how to add pagination using PHP and MySQL. so today in this post we will see how to Send Attachment With Email using php.

so first of all we should take an overview of our working scenario.
in the below code we are created a form with having email, subject,message and attachment fields.

once the form is submitted our script is check that the file’s format is valid or not.
if the file format is valid than the attachment is concatenate with our message field and with the help of MIME (Multipurpose Internet Mail Extensions) version and its content type and boundary.

we will send the attachment. once the mail is send successfully our script will display the success message and if the mail isn’t sent than it will display failure message as well.

send email with attachment in php

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

guys this code is not works on local server like xampp,wamp and appserv. so try it on live server.

delete multiple records using checkbox php

Welcome back to shortlearner.com, in our previous post we learn How to Create pagination using php and mysql . now in this post we will learn how to delete multiple records using checkbox with the help of PHP and MySQL.

delete multiple records in PHP

before start this tutorial first of all we should understand the overall scenario of this post.
now first of all we need to create a database connection , so in this example my database name is testdb .

after creating a database connection we fetch all the records from our user table and designed it in a tabular format with checkbox field, and also create a java script function that will help us to select all check boxes at a time.
so just follow the below code.

Also Read :
Get Domain name from URL
Unable to create a directory a wordpress error
How to Send Attachment on mail using PHP.
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

copy the above code and save it on htdocs directory of your xampp server.
there is a www folder if you are using WAMP or Appserv local server.

share this code with your developer buddies and if you have another way to make it simple ,please feel free to contact we will update your method also in this post.

keep coding, keep learning

How to Create pagination using php and mysql

welcome back to shortlearner.com, in our previous post we learn how to create a signup or registration page with the help of AJAX, PHP and MySQL.

Now in this post today we will learn how to create a pagination using PHP and MySQL.

so most of the time we see when we are developing any kind of software and when we fetch records from our MySQL database it probably returns us thousand or millions records. so it is not a good idea to show all records on a single page, so we split all those records into multiple pages.

pagination in php and mysql

so before start this tutorial we just take an overview how we split records into multiple pages.
first of all we are establish a database connection , in this tutorial my database name is library. so i am going to fetch all the books name and their title which are stored in the table name called bookstore.

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

How to extract all links of web page using PHP

Welcome back to shorltearner.com, in our previous post we learn how to Convert words to numbers with the help of PHP.

extract all url of website

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

so in this post today we will learn how to extract all links of any web page with the help of PHP and will store all the links into MySQL database.
also make a URL extractor platform which will help us to analysis the website.

if some one is using WordPress website we can extract the URLs and check which kind of themes and plugins that website developers are used.
so just follow the below code an develop your own URL extractor.

so in the above code we are just creating a PHP function that takes website URL as a parameter and fetch /extract all the links.
so in the below code we are just passing website URL as a parameter to our function.