Posts

How to filter data from database according to client name & date wise in PHP

Image
In above example we search data for client name digital Dhaval ror date 1-08-2019 to 21-08-2019 //             CODE   //  <div class="demo-content" > <div align="center"  >   <form name="frmSearch" method="post" action=""> <p class="search_input"> <select name="company" id="select" class="" > <option value="Select" name=company" id="comapny">Select</option> <option value="Administrator" name=company" id="comapny">Administrator</option> <?php  $company="select * from clients";  $row=mysql_query($company);  while($data=mysql_fetch_array($row))  {   echo $name=$data['name'];  $id=$data['id']; ?>  <option value="<?php echo $id;   ?>"><?php echo $name;   ?></option>  <?php } ?>  </select>  ...

How to add modal box in your application

Image
Code is below    <div class="modal" id="popUpWindow">     <div class="modal-dialog">       <div class="modal-content">         <!-- header -->         <div class="modal-header" >           <p align ="center">Assign Ticket To Progrmmer</p> <br> <form action="function.php?id=<?php echo $id; ?>" id=myform" method="post" enctype="multipart/form-data"> <select name="progrmaer" id="progrmaer"   class="form-control"> <?php       $sqlprogramer = "select * from sahakaar_user where company = 'Programmer'";   $rowprogramer = mysql_query($sqlprogramer);   while($data = mysql_fetch_array($rowprogramer))   { ?> <option value="<?php echo $data['name'];  ?>"><?php echo $data['name'];  ?></option>...
How to maintain login and logout session time in php 1 maintain login session time with login page code is below <?php include "config.php"; session_start(); $count=0; if(isset($_POST['submit']) and $_POST['submit'] =="Sign In") {  $sql ="select * from user where name ='". $_POST['name']."' and password ='". $_POST['password']."'"; $run = mysql_query($sql); $count=mysql_num_rows($run); if($count > 0) { while($data=mysql_fetch_array($run)) {  $id = $data['id'];  $type = $data['type']; } $_SESSION['name'] = $_POST['name']; $_SESSION['id'] = $id; echo $_SESSION['type'] = $type; header ("location:index.php"); if($count == 1) { echo $_date = date("y/m/d") ; date_default_timezone_set("Asia/Calcutta"); //India time (GMT+5:30) echo $_time = date...
Image
How to Add conformation box "Are you sure you want to delete this record?" before delete record from database in your software. 1 Add java script in your application <script type = "text/javascript" > function clicked () { if ( confirm ( 'Do you want to submit?' )) { yourformelement . submit (); } else { return false ; } } </script> Then Add code in your button like below <input type="submit" onclick="return confirm('Are you sure You want to delete this user?')" name="deleteuser" style="background-color:red;color:white; id="deleteuser" value="Delete" placeholder="Movie Name" required="">

How To Show Popup Window on Index Page With The Help Of Java Script

1 Add Following java script in your application in head section just like below. <script type="text/javascript"> function open_on_entrance(url,name) {     window.open('http://www.google.com','google', ' menubar,resizable,dependent,status,width=800,height=500,left=300,top=200') } </script> 2 Then Add Code in body tag just like below <body onload="open_on_entrance()"></body>

How to send form data to database with the help of PHP and SQL

<?php  include"config.php"; if (isset($_POST ["submit"])) { $sql="insert into book_party(name,email,phone,date, message) values('".$_POST['name']."','".$_POST['email']."','".$_POST['phone']."','".$_POST['date']."' ,'".$_POST['message']."')"; mysql_query($sql); echo $thanks="<font color='blue' size='5'>Thanks For Contactign us, We Will call you Shortly.</font>"; } ?> <form class="" method="post"  action="index.php"  ><br> <input type="text" name="name"  id="name" Placeholder="Name" required   /> <br> <input type="text" name="email"  id="email" Placeholder="Email" required   /><br> ...

How To Edit Data on Edit.php Page With The Help of GET () Method

1 First we receive id on edit.php page from data fetch table page like below. <form action="edit.php?id=<?php echo $id; ?>" method="post" enctype="multipart/form-data">  <input type="image"  src="images/icon/icon.png"   width="50"   id="editm" name="editm" value="<?php echo $data['id'];?>" placeholder="Movie Name" required=""> <input type="hidden"   id="idedit" name="idedit" value="<?php echo $data['id'];?>" placeholder="Movie Name" required="">     </form>  2 Then receive data from DB table with help of id like below and then run update query for update data in database like below example. <?php include("config.php"); $id = isset($_GET['id']) ? $_GET['id'] : ''; $query = "SELECT * from school_classmaster...