Project Name Online Marriage Registration System Language Used PHP5.6, PHP7.x Database MySQL 5.x User Interface Design HTML, AJAX,JQUERY,JAVASCRIPT Web Browser Mozilla, Google Chrome, IE8, OPERA Software XAMPP / Wamp / Mamp/ Lamp (anyone) In the Online Marriage Registration System we use PHP and MySQL Database. This project has two modules i.e. admin and […]
PHP
PHP
How to Create PHP login with Remember me Function
Remember me function is used to save the username and password in login form entered by the user. In this tutorial we are using COOKIES for saving preserving username and user password in the login from. Step 1 : Create a simple html form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<div align="center"> <form action="" method="post" id="login"> <div class="error-message"><?php if(isset($message)) { echo $message; } ?></div> <h4> PHP login with remember me function</h4> <div class="field-group"> <div><label for="login">Username</label></div> <div> <input name="username" type="text" value="<?php if(isset($_COOKIE["user_login"])) { echo $_COOKIE["user_login"]; } ?>" class="input-field"> </div> <div class="field-group"> <div><label for="password">Password</label></div> <div><input name="password" type="password" value="<?php if(isset($_COOKIE["userpassword"])) { echo $_COOKIE["userpassword"]; } ?>" class="input-field"> </div> <div class="field-group"> <div><input type="checkbox" name="remember" id="remember" <?php if(isset($_COOKIE["user_login"])) { ?> checked <?php } ?> /> <label for="remember-me">Remember me</label> </div> <div class="field-group"> <div><input type="submit" name="login" value="Login" class="form-submit-button"></span></div> </div> </form> </div> |
Step 2 : Create a SQL table tbluser
1 2 3 4 5 6 7 |
CREATE TABLE `tbluser` ( `id` int(11) NOT NULL, `userName` varchar(200) DEFAULT NULL, `userPassword` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `tbluser` ADD PRIMARY KEY (`id`); |
Step 3 : Create database configuration […]
How to delete multiple records in PHP
Below are step by step procedure on how to do this simple process. you will need a text editor like notepad++ localhost servers wamp mamp xamp a working pc SQl Table Structure for this tutorial
1 2 3 4 5 6 7 8 9 10 |
CREATE TABLE `tblusers` ( `id` int(11) NOT NULL, `FullName` varchar(140) DEFAULT NULL, `Education` varchar(120) DEFAULT NULL, `postingDate` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `tblusers` ADD PRIMARY KEY (`id`); ALTER TABLE `tblusers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; |
Fetch the data from database and create checkbox . Checkbox name attribute is an array.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
<form name="multipledeletion" method="post"> <div class="container"> <div class="row col-md-6 col-md-offset-2 custyle"> <h2>How to delete Multiple Record in PHP</h2> <!-- Message --> <p style="color:red; font-size:16px;"> <?php if($errmsg){ echo $errmsg; } ?> </p> <table class="table table-striped custab"> <!-- Deletion Button --> <tr> <td colspan="4"> <input type="submit" name="submit" value="Delete" class="btn btn-primary btn-md pull-left" onClick="return confirm('Are you sure you want to delete?');" ></td> </tr> <tr> <th> <!-- For Selecting All --> <li><input type="checkbox" id="select_all" /> Select all</li></th> <th>Name</th> <th>Education </th> <th>Date</th> </tr> <?php $query=mysqli_query($con,"select * from tblusers"); $totalcnt = mysqli_num_rows($query); if ($totalcnt > 0) { while ($row=mysqli_fetch_array($query)) { ?> <tr> <td><input type="checkbox" class="checkbox" name="ids[]" value="<?php echo htmlentities($row['id']);?>"/></td> <td><?php echo htmlentities($row['FullName']);?></td> <td><?php echo htmlentities($row['Education']);?></td> <td><?php echo htmlentities($row['postingDate']);?></td> </tr> <?php } } else { ?> <tr> <td colspan="4"> No Record Found</td> </tr> <?php } ?> </table> </div> </div> </form> |
On Submitting the […]
How to Create a Simple Registration with PHP Email Verification Script
In this tutorail I will explain how to verify a registered email id using PHP. This tutorial include following files 1.Registration file(index.php) 2.Email Verification file(email_verification.php) 3.Login file(login.php) 4. Welcome file(welcome.php) 5. Logout file(logout.php) 6.Database Connection(config.php) Database include one table(userregistration) Structure of userregistration table
1 2 3 4 5 6 7 8 9 |
CREATE TABLE IF NOT EXISTS `userregistration` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `activationcode` varchar(255) NOT NULL, `status` int(11) NOT NULL, `postingdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;<input id="5390.7165924824451" class="cdbx-try-code-web cdbx-btn-main" style="background-color: #ffffff; margin-bottom: 0; color: #008b8b; border: 1px solid rgba(231, 231, 230, 1); border-radius: 10px; font-size: 13px; height: 30px; min-width: 110px; max-width: 220px; padding: 4px; font-weight: normal; outline: none; display: none; float: right;" type="button" value="Run HTML" data-lang="html" data-code="1544284295617.0935" /> |
User Registration form(index.php)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<form name="insert" action="" method="post"> <table width="100%" border="0"> <tr> <th height="62" scope="row">Name </th> <td width="71%"><input type="text" name="name" id="name" value="" class="form-control" required /></td> </tr> <tr> <th height="62" scope="row">Email id </th> <td width="71%"><input type="email" name="email" id="email" value="" class="form-control" required /></td> </tr> <tr> <th height="62" scope="row">Password </th> <td width="71%"><input type="password" name="password" id="password" value="" class="form-control" required /></td> </tr> <tr> <th height="62" scope="row"></th> <td width="71%"><input type="submit" name="submit" value="Submit" class="btn-group-sm" /> </td> </tr> </table> </form><input id="664.9785144824451" class="cdbx-try-code-web cdbx-btn-main" style="background-color: #ffffff; margin-bottom: 0; color: #008b8b; border: 1px solid rgba(231, 231, 230, 1); border-radius: 10px; font-size: 13px; height: 30px; min-width: 110px; max-width: 220px; padding: 4px; font-weight: normal; outline: none; display: none; float: right;" type="button" value="Run HTML" data-lang="html" data-code="1544284415879.466" /> |
Php code for data insertion or sending […]
How to Create Who Is Online” Widget With PHP, MySQL & jQuery
Step 1 – XHTML As usual, we start off with the XHTML part. The code presented here might not look like much, but it is all that we need to show off all the work that has been done by the backend. The widget features a slick slide-out panel with all the geolocation data, shown […]
How to Create PHP Login (Full Script)
Learn to create a simple login system with php + mysql script, this tutorial is easy to follow, teach you step by step. Overview In this tutorial, we create 3 php files for testing our code. 1. main_login.php 2. checklogin.php 3. login_success.php Steps 1. Create table “members” in database “test”. 2. Create file main_login.php. 3. […]
How to Create PHP Multiple Files Upload
You can upload multiple files with one time submit. Array is a big role in this tutorial, let’s see the scripts. Project Structure: In this tutorial, create 2 files 1. multiple_upload.php 2. multiple_upload_ac.php Steps 1. Create file multiple_upload.php 2. Create file multiple_upload_ac.php 3. Create folder “upload” for store uploaded files. .4. CHMOD your upload folder […]
Abstract classes and methods (PHP OOPs)
We use abstract classes and methods when we need to commit the child classes to certain methods that they inherit from the parent class but we cannot commit about the code that should be written inside the methods. An abstract class is a class that has at least one abstract method. Abstract methods can only […]