Posts

Showing posts from April, 2012

how to show alert box on the click in link

<html> <head> <script type="text/javascript"> document.getElementById('myDeleteButton').onclick = function() {   return confirm('Are you sure you want to delete?'); } </script> </head> <body> <a onclick="javascript:return confirm('Are you sure you wish to delete? This action cannot be undone.')" href="DELETE-SCRIPT-URL"> Delete </a> </body> </html>

how to show table data in page formet

<?php session_start(); include("_incu/adminconnectdb.php"); include("_incu/func.php"); $realname=veryfy(); include("functions.php"); $id = $_GET['id']; ?> <?php if($id!="")     {     $query = "DELETE from contact where id='$id'"; $result = mysql_query($query) or die(mysql_error()."Couldn't update record information!"); $_SESSION['msg'] ="One Contact deleted Successfully"; header("Location: adminhome.php"); exit;     }   ?> //--------------------page no........................ <?php //Set the page size $PageSize =  10; $StartRow = 0; //Set the page no if(empty($_GET['PageNo'])) {     if($StartRow == 0)     {         $PageNo = $StartRow + 1;     } } else {     $PageNo = $_GET['PageNo'];     $StartRow = ($PageNo - 1) * $PageSize; } //Set the counter start if($PageNo % $PageSize == 0){     $CounterStart = $P

How to use Google map in your page

<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=vcon+engineers,+Noida&amp;sll=24.20689,74.311523&amp;sspn=8.110402,19.775391&amp;ie=UTF8&amp;ll=28.51629,77.520443&amp;spn=0.140162,0.418975&amp;t=h&amp;output=embed&amp;s=AARTsJovIkikYm5dXPbcrV_yDntEZnAjFg"></iframe>                         <br />                        <small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=vcon+engineers,+Noida&amp;sll=24.20689,74.311523&amp;sspn=8.110402,19.775391&amp;ie=UTF8&amp;ll=28.51629,77.520443&amp;spn=0.140162,0.418975&amp;t=h" target="_blank" style="color:#0000FF;text-align:left">View Larger Map</a></

How to multiple search by the one word

<?php         if ( $_POST["funSearch"] != ""  )        {       $cond='';   if  ( $_POST["name"]  != ""  )       {     $cond .=" and  firstname like '%". $_POST["name"] ."%' " ; $_SESSION["nam"]=$_POST["name"];   }   else   {    $_SESSION["nam"]="";   }      if  ( $_POST["mobile"]  != ""  )       {     $cond .=" and  mobile1 like '%". $_POST["mobile"] ."%' " ;   $_SESSION["mob"]=$_POST["mobile"];   }   else   {    $_SESSION["mob"]="";   }      if  ( $_POST["address"]  != ""  )       {     $cond .= " and  address1 like '%". $_POST["address"] ."%' ";    $_SESSION["add"]= $_POST["address"

Export file in excel formet from your data table

<?php $result = mysql_query("SELECT * FROM contact"); if($_POST['Export']==Export) { $file_name="export.csv"; //name of export file you can change here $titlelist=""; $titlelist="Contact Person,Address,City,State,Mobile,Email"; {    header("Content-type: application/vnd.ms-excel"); header('Content-Disposition: attachment; filename="'.$file_name.'"'); //write proper data fetch syntax $query= "select * from contact"; $stid=mysql_query($query); print $titlelist.chr(13).chr(10); while ($row = mysql_fetch_array($stid)) {      print "{$row['firstname']}, {$row['address1']}, {$row['city']},{$row['state']},{$row['mobile1']},{$row['email1']}";  print chr(13).chr(10); } }     exit (); } ?>