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...
Posts
Showing posts from August, 2016
- Get link
- X
- Other Apps
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=...
- Get link
- X
- Other Apps
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;...
- Get link
- X
- Other Apps
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"); ?>