Sign up with your email address to be the first to know about new products, VIP offers, blog features & more.

 




You are viewing PHP

PHP code snippets, source codes and free student projects.

How to load MySQL data in Bootstrap Modal Body using AJAX

This article was written when I was doing my minor project back in 2015, but wait I have updated this article with the support of new PHP 7 and MySQLi syntax. You’ll find me using PHP, Bootstrap (not the latest but process is same on new Bootstrap 4 as well), and MySQLi with some flavor of AJAX in this article.  On my project I was building a dashboard to show all data in a table by importing data from MySQL database using PHP, where I also added an Edit button at the end of each row that opens up a Modal box, displaying and allowing the admin to alter information and update the database.

So, in this tutorial I will be showing you the best way of Using Bootstrap Modal with AJAX to import data from MySQL database.

share

Creating Simple Login Form Template using Bootstrap

Twitter Bootstrap provides an easy and fastest way to create different types of form using its already defined CSS classes like form-group and form-control. We can use twitter bootstrap forms as per our need and create different types and styles of forms. Bootstrap supports inline form, horizontal form and vertical form and with this we can create signup and Login form template using Bootstrap.

In this section of our Bootstrap Tutorials we will discuss about designing and creating simple login page template using bootstrap forms. If you are already familiar with html and bootstrap then you can directly understand the design else start learning html and bootstrap basics. You can go through the explanation of the code or simply download the source code and use it in your web project. 

share

How to change upload limit of WordPress hosted on Azure VM

In this tutorial, you’ll learn how to change upload limit of WordPress hosted on Azure VM (Virtual Machine). Recently, after hosting a WordPress website on Azure Virtual Machine (Linux), I was trying to upload media and files to the WordPress site. But due to default configuration there was a maximum upload limit of 2MB.

As the WordPress was hosted on Azure Virtual Machine, I couldn’t find the FTP access for the site, the one I used to connect to Virtual Machine through FTP didn’t have WordPress folder in it.

share

How to remove “public/index.php” from URL generated in Laravel

Option 1: Use .htaccess

If it isn’t already there, create an .htaccess file in the Laravel root directory. Create a .htaccess file your Laravel root directory if it does not exists already. (Normally it is under your public_html folder)

Edit the .htaccess file so that it contains the following code:

Now you should be able to access the website without the “/public/index.php/” part.

share