Posts

How To change password from admin panel. 1 Create change password page. 2 create form fields like username, oldpassword, newpassword. //                                             Code                          // <?php include"config.php"; $msg=''; $msg1=''; session_start(); $count=0; if(isset($_POST['submit']) && !empty($_POST['submit'])) {  $sql = "select * from user where email='".$_POST['email']."' and password ='".$_POST['password']."'"; $run = mysql_query($sql); $count = mysql_num_rows($run); if($count>0) { $sql = "UPDATE `user` SET `password`= '".$_POST['newpassword']."'"; $run = mysql_query($sql); $msg1 = "Password change sucessful."; } else { $msg = "Your login details not same."; } } ?> <h3 id="forms-example" class="...
How to approved user from admin panel after registration. 1 After registration admin approved to user from admin apnel. 2 In admin panel we fetch all information related to user in table like id, name, address, email, mobile, password and user status (show link for approved  for non approved user and show disapproved for approved users ). //                                            Code                                                   // <tr>     <td>Name</td>     <td>Email</td>     <td>Address</td>     <td>Mobile Number</td> <td>Password</td> <td>Status</td> <td>delete</td> </tr>...
How to create register form on your web application for users.. 1 create a table in your database and table fields are name, email, address, mobile, password, status=0 etc. 2 Create a form and submit all details in your table with the help of insert operation. 3 Also check user is already registered or not if user already registered in your DB print the massage (You are already registered please login with username and password.). 4 After registration user have not permission to enter in admin area in web application because the value of user status=0. . 5 admin approved user from admin panel to provide permission to user to access the admin area of web application and when admin approve the user from admin panel the status of user change to 1. //                                                           Code   ...
How to create admin panel in php with username and password. 1 create user table in your database. db fields are id, email, password, status. 2 insert some data like your email, password, status=1, id is AI. 3 connect your db with your application with  coonection file. Apply below php and sql script on your application. //                         Code                                                                   // <html> <head> <body  bgcolor="#999999"> <div align="center" <p> Please Enter user name Or password : </p> </div> <br> <br> <br> </div> <?php include "config.php"; session_start(); $count=0; if(isset($_POST['submit']) and $_POST['submit'] =="l...
How to fetch data from DB and fetch data in table form.  create a html table in your web application where you want  to fetch data. and apply coding like below. //                                        Code                                               // <!DOCTYPE html> <html> <body> <?php include"config.php"; ?> <table width="50%" border="1"> <?php  $sql = "select * from employer"; $row=mysql_query($sql); ?>   <tr>     <td>Id;</td>     <td>Emp-Name;</td>     <td>Emp- Address;</td>     <td>Mobile Nomber;</td>     <td>Salary;</td>   </tr> <?php  while($data=...
How to insert values in database from PHP Form. 1 Create Form in html. 2 Create table in your DB (Data base). 3 create connection file in php and connect db with your application. //                              Code For This Task.                                           // <!DOCTYPE html> <html> <body> <?php include"config.php"; print_r($_POST);  $sql="insert into employer(emp_name,emp_address,mobile_number,salary) values('".$_POST['Emp-Name']."','".$_POST['Emp_Address']."','".$_POST['Mobile_Nomber']."','".$_POST['Salary']."')"; mysql_query($sql); ?> <form action="index.php" method="post" enctype="application/x-www-form-urlencoded" name="Save" target="_self"> <table width="20%" border="1">   <tr>     <td>Id;...
Create connection file in php connection file is used to connect DB with web application. //                                          Code                                         // <?php define ("db-host", "localhost"); define ("user-name", "root"); define ("password", ""); define ("database", "database name"); $link=mysql_connect("localhost","root","") or die ("errror"); $db=mysql_select_db("database name", $link)or die ("errror"); ?>