Skip to main content

Posts

Showing posts with the label Form

Create secure login script in PHP

Recently more than 10 members asked me how to create secure login script in PHP. So in this article am going to explain you how to create a secure login system using PHP and MYSQL. This type of login system am using in most of the website, if you are using any CMS means no need of this system because CMS have inbuilt login system. In this method am mainly concentrating on the username and password strings. Am using number of steps to clear the string and prevent the any type of SQL injection to avoid the hacking. First we will start the session and connecting to the database. FInd the PHP code below, //Start session session_start(); //Array to store validation errors $errmsg_arr = array(); //Validation error flag $errflag = false; //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select...

Why Should You Add Front-end Login Page in WordPress and How

Sending your WordPress website users to the default login page is fine when you’re running a site with just a handful of users. But, in case you’re running a membership site or other sites with large user base, making users access their profile page in the WordPress site’s admin panel via the default login page is something you should avoid. Wondering why? It’s a well-known fact that the WordPress login page appears to be bland and boring. No doubt, the login page serves as the central entry point for millions of WordPress sites worldwide. But what if your users don’t really need to access the dashboard? Well, users belonging to a membership site are not usually interested in accessing the WordPress admin dashboard (except when they need to create a post or perform edit operations). Thus, making those users open up the admin panel through the login page is likely going to prove bad for user experience. However, you can ensure to deliver an enhanced user experience (UX) by letting ...

Add Event to Calendar using jQuery, Ajax and PHP

In our first PHP event calendar tutorial, we had shown how to create an event calendar using jQuery, Ajax, and PHP . That tutorial provides the script for generating calendar and display events from the MySQL database on the respective date. In this second part of the PHP event calendar tutorial, we’ll show how to add events to the calendar using jQuery, Ajax, PHP & MySQL. Means we’ll extend our PHP event calendar script with add event functionality. Before you begin, we suggest you read the first part of PHP event calendar tutorial . It will help to understand our event calendar scripts. Build an event calendar using jQuery, Ajax and PHP Files structure of PHP Event Calendar would be the same as the first part. Here we’ll use the same scripts but the event adding code will be added. Open the functions.php file and make the following changes. Add addEvent case on switch-case in functions.php file. case 'addEvent': addEvent($_POST['date'],$_POST[...

Server Side Filtering using jQuery Ajax PHP and MySQL

Filtering helps the user to sort the recordset in the data list. Using the search and filter feature user can find the relevant data from the huge number of records list. In the web application, sorting or filtering is very useful where many data is listed. In this tutorial, we’ll show you how to implement server side filtering feature on data list using jQuery, Ajax, PHP, and MySQL. Our example script provides a search and filter option on records list. A user can be able to search some particular records in the data list from MySQL database or filter records by the specific type (like newest records, records by ascending and descending order, records by status). This server side search and filter in PHP is used jQuery and Ajax to do this filtering functionality without page refresh. In our example script, initially, we’ll fetch and display all the users data from the MySQL database with data search and sort option. Once user search by keywords, users list will be filter based on the ...

Creating a Simple Contact Form with PHP

The Contact Form is an essential element for almost every website. The contact us form allow visitors to communicate with the site owner from the website. Using the contact us form , visitors can easily submit their query, views, opinions and suggestions to the site administrator about the website, service or product. Also, the submitted information can be sent to site owner or administrator via email. Contact form helps you to receive the query from visitors and provide quick response to the visitors. The thought of a contact form is very simple, the user is able to send their query via email to the respective organization. In this tutorial, we’ll show you how to create a simple contact form with PHP and integrate it into your website. Using our PHP contact form script you’ll be able to add a contact us form to your website within 5 minutes. The contact form not only is submitted but also an email will be sent to you on every form submission using PHP. For your better understandin...

Registration and Login System with PHP and MySQL

Login system is a key feature for every membership website. Registration and login system implementation is very easy with PHP. In this tutorial, we’ll show you how to build a simple login system with PHP and MySQL . Our PHP script will demonstrate the user registration and login system with MySQL and PHP Session . Also, PHP server side validation is used on login and registration to validate user data. Before you begin take a look at the used files and their uses in PHP Login System. user.php – handle database related works userAccount.php – handle registration, login, and logout request with User Class index.php – display login form / user details registration.php – display registration form style.css – styling login and registration form Database Table Creation A table is needed to store the user details in the database. The following SQL creates a users table with some required columns. CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(100) C...

Forgot Password Recovery in Login System with PHP and MySQL

Forgot password recovery feature is mandatory for login system. It helps the user to update account password which they have forgotten. Using forgot password link user can easily reset their account password. In this tutorial, we’ll show you the forgot password recovery process and create a script to implement forgot password email functionality in PHP Login System. Our previous PHP Login System tutorial had provided a guide to implementing user registration and login system in PHP. Now we’ll extend that PHP login script with forgot password functionality with PHP and MySQL . Also, we’ll show you how can send reset password link via email to the user. Before you begin with this forgot password recovery tutorial, we suggest go through the previous PHP login system tutorial first. Here the files list that is used in forgot password recovery process. user.php – handle database related works userAccount.php – handle forgot password, reset password, and email sending. index.php – dis...

jQuery Password Validation

In html take the input boxes and put the type to password  take one button and one checkbox to make the password boxes to show and hide. <div class="lessoncup"> <h1>Password Validation</h1> <em></em> <input name="pass" type="password" id="pass" class="pass" placeholder="Password"> <span>0 - 8</span> <input name="repass" type="password" id="repass" class="pass" placeholder="Re enter Password"> <input name="" type="checkbox" id="showpass"><span>Show Password</span> <input name="submit" type="button" id="submit" class="submit" value="Check"> </div> <script type="text/javascript" src="jquery-1.10.2.min.js"></script> <script> $(document).ready(function(){ $('#submit'...