Dynamically Change Alternate row colors using jQuery 0

Dynamically Change Alternate row colors using jQuery

Dynamically Change Alternate row colors using jQuery

Today, We want to share with you Dynamically Change Alternate row colors using jQuery.
In this post we will show you Dynamically Change Alternate row colors using jQuery, hear for Dynamically Change Alternate row colors using jQuery we will give you demo and example for implement.
In this post, we will learn about Dynamically Change Alternate row colors using jQuery with an example.

The Simple :odd selector selects each (odd type) element with an odd index number (like: 1, 3, 5, etc.).

The Simple :even selector selects each (even type) element with an even index number (like: 2,4,6, etc.).

0-based indexing

Syntax : JQuery find alternative rows in a table using “even and odd” selector

$("#tableid tr:even").css("background-color", "#colorcode");
$("#tableid tr:odd").css("background-color", "#colorcode");

Selecting odd and even elements – jQuery Example-1

$(document).ready(function() {
	$("tr:odd").css("background-color","#4285F4");
    $("tr:even").css("background-color","#34A853");
});

Selecting odd and even elements – jQuery Example-2

$(document).ready(function() {
	$("tr:odd").css("background-color","red");
    $("tr:even").css("background-color","green");
});

Jquery :odd :even Selector Example

<div>Pakainfo.com - Dsp patel</div>
<div>Pakainfo.com - Angular king</div>
<div>Pakainfo.com - Php Master</div>
<div>Pakainfo.com - All Rounder</div>
----------------

$('div').each(function(i, el) 
{
   if (i % 2 === 0) 
   { 
		/* we are even */ 
		alert("we are even");
   }
   else 
   { 
	/* we are odd */ 
	alert("we are odd");
   }
});

“Alternate Table row color” using jQuery with Example

HTML-part for jQuery Alternate Table

<table>
    <tr>
        <td>Larvael-odd</td>
        <td>PHP-odd</td>
    </tr>
    <tr>
        <td>jQuery-even</td>
        <td>JavaScript-even</td>
    </tr>
    <tr>
        <td>AngularJs-odd</td>
        <td>VueJs-odd</td>
    </tr>
    <tr>
        <td>Magento-even</td>
        <td>Codiginter-even</td>
    </tr>
    <tr>
        <td>demo-odd</td>
        <td>Example-odd</td>
    </tr>
</table>

Jquery Part for jQuery Alternate Table

$('tr:odd').addClass('odd');
$('tr:event').addClass('even');

Style – CSS for jQuery Alternate Table

table, tr, td {
    border-collapse: collapse;
    border: 1px solid yellow;
}
table {
    width: 100%;
}
tr.odd {
    background: #4285F4;
}
tr.even {
    background: #3895F4;
}

View Demo

We hope you get an idea about Dynamically Change Alternate row colors using jQuery
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.

Multiple Image Upload using PHP into MYSQL database 0

Multiple Image Upload using PHP into MYSQL database

Multiple Image Upload using PHP into MYSQL database

Today, We want to share with you Multiple Image Upload using PHP into MYSQL database.
In this post we will show you Multiple Image Upload using PHP into MYSQL database, hear for Multiple Image Upload using PHP into MYSQL database we will give you demo and example for implement.
In this post, we will learn about Multiple Image Upload using PHP into MYSQL database with an example.

i have This IMP POST explained about How to upload The multiple images or Files in the database(Like as a Mysql).

The Multiple all files or image can be uploaded using different name for HTML input.

enctype=”multipart/form-data”. 
 type=” file”

upload multiple images in php example

Use 
 <form action="do_upload.php" method="post" enctype="multipart/form-data">
    <input type="file"  name="images[]"  multiple="multiple" accept="image/*" />
    <input type="submit" name="sub" value="Upload!" />
 </form>

“Multiple Image Upload” using PHP into MYSQL database

File Structure

multiple_upload(Dir Name)
->upload(Dir Name)
->config.php
->index.php
->upload.php

DataBase Name : gallery_tbl

First of All Crate a Simple TABLE in Your DataBase.

Table Name : gallery

CREATE TABLE IF NOT EXISTS `gallery` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

File Name : Config.php

<?php
$db = new mysqli("localhost","root","mypass**","gallery_tbl");
// Check It My SQLi connection
if (mysqli_connect_errno())
{
	echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?> 

File Name : index.php

<html>
<head><title>How to upload/store multiple images in mysql database in php</title></head>
<body>
<div style="margin:auto;width:900px;">

<div>
 <form action="upload.php" method="post" enctype="multipart/form-data">
    <input type="file"  name="images[]"  multiple="multiple" accept="image/*" />
    <input type="submit" name="sub" value="Upload!" />
 </form>
</div>
<?php 
  //include config.php where all configuration
  include('config.php');	
  
  //execute select query for fetch database to images name
  $sql = $db->query("SELECT * FROM gallery");
  if(isset($sql) && count($sql)) :  // check condition
  foreach ($sql as $key => $row) : ?>
  //print all display all images
   <img class="circle" src="uploads/<?php echo $row['image']; ?>" /> 
<?php   endforeach;   endif; ?>

</div>
</body>
</html>
<style type="text/css">
  .circle {
  border: solid 1px #dedede;
  width: 250px;
  padding: 4px;
  background-color: #fff;
  border-radius: 70%;
  -webkit-transition: -webkit-transform .8s ease-in-out;
  transition: transform .8s ease-in-out;
}
.circle:hover {
  
  -webkit-transform: rotate(360deg);
  transform: rotate(360deg);
}
  </style>

File Name : upload.php

<?php
include('config.php');
error_reporting(0);	
//check condition for images upload or not	
if(isset($_FILES['images']['name'])):
  define ("MAX_SIZE","2000");
  //all multiple images fetch using for loop
  for($i=0; $i<count($_FILES['images']['name']); $i++)  {
  // check size for images
  $size=filesize($_FILES['images']['tmp_name'][$i]);    
  
  //check condition for image size
  if($size < (MAX_SIZE*1024)):    
   $path = "uploads/"; // upload directory file name
   $name = $_FILES['images']['name'][$i]; // image name store
   $size = $_FILES['images']['size'][$i]; // image size store
   list($txt, $ext) = explode(".", $name);
   date_default_timezone_set ("Asia/Calcutta"); 
   $currentdate=date("d M Y");	
   $file= time().substr(str_replace(" ", "_", $txt), 0);
   $info = pathinfo($file);
   $filename = $file.".".$ext;// all images uploaded here
    if(move_uploaded_file($_FILES['images']['tmp_name'][$i], $path.$filename)) : 	      
	   $fetch=$db->query("INSERT INTO gallery(image) VALUES('$filename')");
	   if($fetch):
	   	 header('Location:index.php');
	   else :
         $error ='your Data not inserting';
	   endif;
	else :
		$error = 'your File (All images) moving unsuccessful';
	endif;
  else:
  	 $error = 'You have exceeded the File (some images or files)size limit!';
  endif;      
  }
else:
  $error = 'Your File not found!';
endif;			
?>

View Demo

We hope you get an idea about Multiple Image Upload using PHP into MYSQL database
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.

List of players sold and unsold in IPL 2019 0

List of players sold and unsold in IPL 2019

List of players sold and unsold in IPL 2019

Here is the simple list of the final list of all the playeTeams of indian Player rupee about SOLD at Approximate today’s data Teams of indian Player rupee about in auction Teams of indian Player rupee about 1 crore about the = US dollaTeams of indian Player rupee about 149,421 this value abouts (Approximate data value, as on today)List of players sold and unsold in IPL 2019

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.List of playeTeams of indian Player rupee about sold and unsold in IPL 2019 – Teams of indian Player Premier League

Total – 66 (27 oveTeams of indian Player rupee abouteas)

  • 1. Eoin Morgan (Teams of Englands Player) – Teams of indian Player rupee about 2 crore ($298,842) – Kings XI Punjab (KXIP)
  • 2. Pawan Negi (Teams of indian Player) – Teams of indian Player rupee about 1 crore ($149,421) – Royal ChallengeTeams of indian Player rupee about Bangalore (RCB)
  • 3. Angelo Mathews (Teams of Sri Lanka Player) – Teams of indian Player rupee about 2 crore ($298,842) – Delhi Daredevils (DD)
  • 4. Ben Stokes (Teams of Englands Player) – Teams of indian Player rupee about 14.5 crore ($2,166,604) – Rising Pune Supergiants (RPS)
  • 5. Corey AndeTeams of indian Player rupee abouton (Teams of New Zealand Player) – Teams of indian Player rupee about 1 crore ($149,421) – DD
  • 6. Nicholas Pooran (Teams of West Indies Player) – Teams of indian Player rupee about 30 lakh ($44,826) – Mumbai Teams of indian Players (MI)
  • 7. Kagiso Rabada (Teams of South Africa Player) – Teams of indian Player rupee about 5 crore ($747,105) – DD
  • 8. Trent Boult (Teams of New Zealand Player) – Teams of indian Player rupee about 5 crore ($747,105) – Kolkata Knight RideTeams of indian Player rupee about (KKR)
  • 9. Tymal Mills (Teams of Englands Player) – Teams of indian Player rupee about 12 crore ($1,793,052) – RCB
  • 10. Pat Cummins (Teams of Australia Player) – Teams of indian Player rupee about 4.5 crore ($672,394) – DD
  • 11. Mitchell Johnson (Teams of Australia Player) – Teams of indian Player rupee about 2 crore ($298,842) – MI
  • 12. Ankeet Bawane (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – DD
  • 13. Tanmay Agarwal (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – SRH
  • 14. Mohammad Nabi (Afghanistan) – Teams of indian Player rupee about 30 lakh ($44,826) – SRH
  • 15. K Gowtham (Teams of indian Player) – Teams of indian Player rupee about 2 crore ($298,842) – MI
  • 16. Rahul Tewatia (Teams of indian Player) – Teams of indian Player rupee about 25 lakh ($37,355) – KXIP
  • 17. Aditya Tare (Teams of indian Player) – Teams of indian Player rupee about 25 lakh ($37,355) – DD
  • 18. Eklavya Dwivedi (Teams of indian Player) – Teams of indian Player rupee about 75 lakh ($112,065) – SRH
  • 19. Aniket Choudhary (Teams of indian Player) – Teams of indian Player rupee about 2 crore ($298,842) – RCB
  • 20. Thangarasu Natarajan (Teams of indian Player) – Teams of indian Player rupee about 3 crore ($448,263) – KXIP
  • 21. Nathu Singh (Teams of indian Player) – Teams of indian Player rupee about 50 lakh ($74,710) – Gujarat Lions (GL)
  • 22. Basil Thampi (Teams of indian Player) – Teams of indian Player rupee about 85 lakh ($127,007) – GL
  • 23. Murugan Ashwin (Teams of indian Player) – Teams of indian Player rupee about 1 crore ($149,421) – DD
  • 24. Tejas Baroka (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 25. Rashid Khan Arman (Afghanistan) – Teams of indian Player rupee about 4 crore ($597,684) – SRH
  • 26. Pravin Tambe (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – SRH
  • 27. Chris Woakes (Teams of Englands Player) – Teams of indian Player rupee about 4.2 crore ($627,568) – KKR
  • 28. Karn Sharma (Teams of indian Player) – Teams of indian Player rupee about 3.2 crore ($478,147) – MI
  • 29. Rishi Dhawan (Teams of indian Player) – Teams of indian Player rupee about 55 lakh ($82,181) – KKR
  • 30. Matt Henry (Teams of New Zealand Player) – Teams of indian Player rupee about 50 lakh ($74,710) – KXIP
  • 31. Jaydev Unadkat (Teams of indian Player) – Teams of indian Player rupee about 30 lakh ($44,826) – RPS
  • 32. Varun Aaron (Teams of indian Player) – Teams of indian Player rupee about 2.8 crore ($418,378) – KXIP
  • 33. Manpreet Gony (Teams of indian Player) – Teams of indian Player rupee about 60 lakh ($89,652) – GL
  • 34. Martin Guptill (Teams of New Zealand Player) – Teams of indian Player rupee about 50 lakh ($74,710) – KXIP
  • 35. Jason Roy (Teams of Englands Player) – Teams of indian Player rupee about 1 crore ($149,421) – GL
  • 36. Saurabh Tiwary (Teams of indian Player) – Teams of indian Player rupee about 30 lakh ($44,826) – MI
  • 37. Chris Jordan (Teams of Englands Player) – Teams of indian Player rupee about 50 lakh ($74,710) – SRH
  • 38. Nathan Coulter-Nile (Teams of Australia Player) – Teams of indian Player rupee about 3.5 crore ($522,973) – KKR
  • 39. Praveen Dubey (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – RCB
  • 40. Navdeep Saini (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – DD
  • 41. Ben Laughlin (Teams of Australia Player) – Teams of indian Player rupee about 30 lakh ($44,826) – SRH
  • 42. Billy Stanlake (Teams of Australia Player) – Teams of indian Player rupee about 30 lakh ($44,826) – RCB
  • 43. Mohammed Siraj (Teams of indian Player) – Teams of indian Player rupee about 2.6 crore ($388,494) – SRH
  • 44. Rahul Chahar (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – RPS
  • 45. Saurabh Kumar (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – RPS
  • 46. Asela Gunaratne (Teams of Sri Lanka Player) – Teams of indian Player rupee about 30 lakh ($44,826) – MI
  • 47. Daniel Christian (Teams of Australia Player) – Teams of indian Player rupee about 1 crore ($149,421) – RPS
  • 48. Rovman Powell (Teams of West Indies Player) – Teams of indian Player rupee about 30 lakh ($44,826) – KKR
  • 49. Darren Sammy (Teams of West Indies Player) – Teams of indian Player rupee about 30 lakh ($44,826) – KXIP
  • 50. Munaf Patel (Teams of indian Player) – Teams of indian Player rupee about 30 lakh ($44,826) – GL
  • 51. Kulwant Khejroliya (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – MI
  • 52. Rinku Singh (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – KXIP
  • 53. Shashank Singh (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – DD
  • 54. Milind Tandon (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – RPS
  • 55. Chirag Suri (United Arab Emirates) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 56. Shelley Shaurya (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 57. Shubam Agarwal (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 58. R Sanjay Yadav (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – KKR
  • 59. Ishank Jaggi (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – KKR
  • 60. Rahul Tripathi (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – RPS
  • 61. Pratham Singh (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 62. Aksh Deep Nath (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – GL
  • 63. Darren Bravo (Teams of West Indies Player) – Teams of indian Player rupee about 50 lakh ($74,710) – KKR
  • 64. Manoj Tiwary (Teams of indian Player) – Teams of indian Player rupee about 50 lakh ($74,710) – RPS
  • 65. Sayan Ghosh (Teams of indian Player) – Teams of indian Player rupee about 10 lakh ($14,942) – KKR
  • 66. Lockie Ferguson (Teams of New Zealand Player) – Teams of indian Player rupee about 50 lakh ($74,710) – RPS

More news..

IPL 2019 NEWS LATEST IPL 2019 NEWS | List of players sold and unsold in IPL 2019

PHP GET Today Yesterday Last-7-Days This-Month-Last-Month This-Year Last-Year,All-Time 0

PHP GET Today Yesterday Last-7-Days This-Month-Last-Month This-Year Last-Year,All-Time

PHP GET Today Yesterday Last-7-Days This-Month-Last-Month This-Year Last-Year,All-Time

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.For

Select records from today, this week, this month php mysql

<?php 
echo "<pre>";
echo $today = date('Y-m-d');
echo $datseven=date('Y-m-d', strtotime('-7 days'));
echo $datyesterday=date('Y-m-d', strtotime('-1 days'));
echo $thismonth=date('m');
echo $lastmonth=date('m', strtotime(date('Y-m')." -1 month"));
echo $thisyear=date('Y');
echo $lastyear=date("Y",strtotime("-1 year"));
echo "</pre>";
?>

HTML Part

<div class="col-md-6 col-md-offset-1 col-sm-6 col-xs-12">
	<div class="select_box">
		<select id="selectidbigmachine">
			<option value="0" name="0">Today</option>
			<option value="1" name="1">Yesterday</option>
			<option value="7" name="7">Last 7 Days</option>
			<option value="30" name="30">This Month</option>
			<option value="31" name="31">Last Month</option>
			<option value="365" name="365">This Year</option>
			<option value="366" name="366">Last Year</option>
			<option value="9" name="9">All Time</option>
		</select>
	</div>
</div>

php Part : Query check function

<?php
function getfilterdata($sdate)
{

/*Filter Date Logic*/
$today = date('Y-m-d');
$datseven=date('Y-m-d', strtotime('-7 days'));
$datyesterday=date('Y-m-d', strtotime('-1 days'));
$thismonth=date('m');
$lastmonth=date('m', strtotime(date('Y-m')." -1 month"));
$thisyear=date('Y');
$lastyear=date("Y",strtotime("-1 year"));
			
if($sdate==7)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where DATE(subbig.date) >= '$datseven' and DATE(suptotal.sdate) >= '$datseven' ORDER BY users.name ASC";
		}
		if($sdate==1)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where DATE(subbig.date) = '$datyesterday' and DATE(suptotal.sdate) = '$datyesterday' ORDER BY users.name ASC";
				 
		}
		if($sdate==30)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where MONTH(subbig.date) = '$thismonth' and MONTH(suptotal.sdate) = '$thismonth' ORDER BY users.name ASC";
				
		}
		if($sdate==31)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where MONTH(subbig.date) = '$lastmonth' and MONTH(suptotal.sdate) ='$lastmonth' ORDER BY users.name ASC";
				
		}
		if($sdate==365)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where YEAR(subbig.date) = '$thisyear' and YEAR(suptotal.sdate) ='$thisyear' ORDER BY users.name ASC";
				
		}
		if($sdate==366)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where YEAR(subbig.date) = '$lastyear' and YEAR(suptotal.sdate) ='$lastyear' ORDER BY users.name ASC";
				
		}
		if($sdate==0)
		{
				$query = "select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id 
				INNER JOIN suptotal ON users.id=suptotal.user_id where DATE(subbig.date) = '$today' and DATE(suptotal.sdate) = '$today' ORDER BY users.name ASC";
		}
		if($sdate==9)
		{
				$query = "select DISTINCT (users.id),SUM(suptotal.total) as total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id 
				INNER JOIN suptotal ON users.id=suptotal.user_id GROUP BY users.id ORDER BY users.name ASC";
		}
		echo "<pre>";
		print_r($query);
		echo "</pre>";
}
?>

Join Query with Date Format Yesterday

$query = “select DISTINCT (users.id),suptotal.total,users.user_bm_percent,users.user_type,users.name,users.user_on_percent,users.status from users INNER JOIN subbig ON users.id=subbig.user_id INNER JOIN suptotal ON users.id=suptotal.user_id where DATE(subbig.date) = ‘$datyesterday’ and DATE(suptotal.sdate) = ‘$datyesterday’ ORDER BY users.name ASC”;

Example

Responsive back to top using jquery 0

Responsive back to top using jquery

Responsive back to top using jquery

Learn how to sumple create a button of “scroll back to top” button jquery with CSS.
Create a simple button that will take and use css with jquery the user to easyly the top of the page when clicked on:
Back to top buttons are a easy to top great usability HTML element of a web page or apps, and having one on we website adds a small task but helpful more detail most of us are used to.

Include jquery

<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

Script.js

<script type='text/javascript'>
$(document).ready(function(){ 
	$(window).scroll(function(){ 
		if ($(this).scrollTop() > 100) { 
			$('#pagescroll').fadeIn(); 
		} else { 
			$('#pagescroll').fadeOut(); 
		} 
	}); 
	$('#pagescroll').click(function(){ 
		$("html, body").animate({ scrollTop: 0 }, 600); 
		return false; 
	}); 
});
</script>

style

<style type="text/css">

h1{font-size:45px;text-align:center; text-decoration:underline;}
h2{font-size:40px;color:#FA0530}
p{font-size:40px;}

#pagescroll {
position:fixed;
right:12px;
bottom:12px;
cursor:pointer;
width:60px;
height:60px;
background-color:#3498db;
text-indent:-9999px;
display:none;
-webkit-border-radius:50px;
-moz-border-radius:50px;
border-radius:50px
}
#pagescroll span {
position:absolute;
top:50%;
left:50%;
margin-left:-9px;
margin-top:-13px;
height:0;
width:0;
border:10px solid transparent;
border-bottom-color:#D3D3D3
}
#pagescroll:hover {
background-color:#F5f6e6;
opacity:1;filter:"alpha(opacity=100)";
-ms-filter:"alpha(opacity=100)";}
</style>

index.html

<body>
<!-- BackToTop Button -->
<a href="#" id="pagescroll" title="pagescroll to Top" style="display: none;">Top<span></span></a>

<h2>About Pakainfo.com – About Us</h2>
<br/>
<p>Welcome to Pakainfo.com – a blog my technologies blogs where you will learn about some Tips, Tricks and More…</p>
<p>In other words means other sens to say, it is a community type of new experiment and research or demo with example in It World (pakainfo).</p>
<p>Pakainfo.com was founded in april, 2019 with the aim of all kind of sharing a place for some Tips, some about it related Tricks and Other very dificult Informer articles or new information for it technologies,tutorials and related solutions very expert level high solution in easy and simplified way that more helps our some Tricks and Tips community including like as Windows and server like as a linux and OS,Google,Google Adsense ,Fiver ,Upwork and How to Make Money Easy way to get basic ideas, learning and understandings.</p>
<p>This blog offers wide range of Tricks and Tips topics including Google, Google Adsense, How to Earn Money using Blogger or Website, Fiver and many more.</p>
<p>Pakainfo.com is the right blog for anyone who is passionate about Earn or Make Money To Home without any InvestMent<br />
of Tips and Tricks methodology.So, grab the opportunity and start learning today!</p>
<br/><br/>
<h3>Why Pakainfo.com?</h3>
<br/>
<ul>
<li>Tremendous Opportunity for Growth</li>
<li>Equal Opportunity Every Person</li>
<li>Earn or Make Money To Home without any InvestMent</li>
<li>Open to New and Innovative Ideas</li>
</ul>
<br/><br/>
<p><b>pakainfo – Goal</b></p>
<br/>
<p style="text-align: justify;">Hello! I am angular king and pakainfo is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.</p>
<br/><br/>
<p><b>pakainfo says</b></p>
<br/>
<p>We are Web Technology Experts and Team who provide you very Important information on Web Development information, Interview Questions and Answers, live project problem solution and their solution and online free tutorials – “Pakainfo.com”.</p>
<p><a href="https://pakainfo.com/" target="_blank" title="pakainfo" alt="pakainfo" class="download">Live Site</a></p>
</body>

Full Source Code : Example custom bootstrap back to top arrow

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Back To Top Button by Pakainfo.com</title>
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type='text/javascript'>
$(document).ready(function(){ 
	$(window).scroll(function(){ 
		if ($(this).scrollTop() > 100) { 
			$('#pagescroll').fadeIn(); 
		} else { 
			$('#pagescroll').fadeOut(); 
		} 
	}); 
	$('#pagescroll').click(function(){ 
		$("html, body").animate({ scrollTop: 0 }, 600); 
		return false; 
	}); 
});
</script>
<style type="text/css">

h1{font-size:45px;text-align:center; text-decoration:underline;}
h2{font-size:40px;color:#FA0530}
p{font-size:40px;}

#pagescroll {
position:fixed;
right:10px;
bottom:10px;
cursor:pointer;
width:50px;
height:50px;
background-color:#3498db;
text-indent:-9999px;
display:none;
-webkit-border-radius:60px;
-moz-border-radius:60px;
border-radius:60px
}
#pagescroll span {
position:absolute;
top:50%;
left:50%;
margin-left:-8px;
margin-top:-12px;
height:0;
width:0;
border:9px solid transparent;
border-bottom-color:#ffffff
}
#pagescroll:hover {
background-color:#e74c3c;
opacity:1;filter:"alpha(opacity=100)";
-ms-filter:"alpha(opacity=100)";}
</style>

</head>

<body>
<!-- BackToTop Button -->
<a href="#" id="pagescroll" title="pagescroll to Top" style="display: none;">Top<span></span></a>

<h2>About Pakainfo.com – About Us</h2>
<br/>
<p>Welcome to Pakainfo.com – a blog my technologies blogs where you will learn about some Tips, Tricks and More…</p>
<p>In other words means other sens to say, it is a community type of new experiment and research or demo with example in It World (pakainfo).</p>
<p>Pakainfo.com was founded in april, 2019 with the aim of all kind of sharing a place for some Tips, some about it related Tricks and Other very dificult Informer articles or new information for it technologies,tutorials and related solutions very expert level high solution in easy and simplified way that more helps our some Tricks and Tips community including like as Windows and server like as a linux and OS,Google,Google Adsense ,Fiver ,Upwork and How to Make Money Easy way to get basic ideas, learning and understandings.</p>
<p>This blog offers wide range of Tricks and Tips topics including Google, Google Adsense, How to Earn Money using Blogger or Website, Fiver and many more.</p>
<p>Pakainfo.com is the right blog for anyone who is passionate about Earn or Make Money To Home without any InvestMent<br />
of Tips and Tricks methodology.So, grab the opportunity and start learning today!</p>
<br/><br/>
<h3>Why Pakainfo.com?</h3>
<br/>
<ul>
<li>Tremendous Opportunity for Growth</li>
<li>Equal Opportunity Every Person</li>
<li>Earn or Make Money To Home without any InvestMent</li>
<li>Open to New and Innovative Ideas</li>
</ul>
<br/><br/>
<p><b>pakainfo – Goal</b></p>
<br/>
<p style="text-align: justify;">Hello! I am angular king and pakainfo is my web technologies blog. My specialities are Vuejs,API,angularjs,Vuejs,PHP, API, jQuery,Earn money,HTML,CSS eCommerce,JS,Laravel, CMS and bespoke web application development.</p>
<br/><br/>
<p><b>pakainfo says</b></p>
<br/>
<p>We are Web Technology Experts and Team who provide you very Important information on Web Development information, Interview Questions and Answers, live project problem solution and their solution and online free tutorials – “Pakainfo.com”.</p>
<p><a href="https://pakainfo.com/" target="_blank" title="pakainfo" alt="pakainfo" class="download">Live Site</a></p>
</body>
</html>

Example

Example

Fatal error: Call to undefined function sqlsrv_connect() 0

Fatal error Call to undefined function sqlsrv_connect

Fatal error: Call to undefined function sqlsrv_connect()

There are mostly two php.ini changes files located, in my case, for wamp or xampp server.
One is simple change under the php custom folder changes and the other changes one is in the path of C:\wamp\bin\apache\Apachex.x.x\bin folder.
When connecting to SQL database through sqlsrv_connect used this function,
we are referring to simple the php.ini file in the apache folder.

Add the following php latest version (as per your version) to this file:

extension=c:/wamp/bin/php/php5.4.16/ext/php_sqlsrv_53_ts.dll

PHP Config File Check

Use this simple script to check the your php version:

<?php echo phpinfo(); ?>

Step by Step (call to undefined function sqlsrv_connect() xampp)

Step 1

Download SQLSRV32.EXE (Microsoft Drivers for PHP for SQL Server) from: http://www.microsoft.com/en-us/download/details.aspx?id=20098

Step 2

Choose path: C:\xampp\php\ext

Step 3

simple Uncomment or Append extension = php_sqlsrv_56_ts.dll in php.ini

Step 4

Last step to Restart Apache from XAMPP or wamp server Control Panel (Stop/Start)

Load the simple PHP drivers in php.ini file and restart the server.

extension=php_sqlsrv_53_ts.dll
extension=php_pdo_sqlsrv_53_ts.dll

SQL Connection Simple way

<?php
$serverName = "200.225.289.248, 1433"; //serverName\instanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=>"pakainfo", "UID"=>"sa", "PWD"=>"[email protected]");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
    // echo "Connection established.<br />";
}else{
	echo "<pre>";
     echo "Connection could not be established.<br />";
     die( print_r( sqlsrv_errors(), true));
	 echo "</pre>";
}

?>

SQL Query

$query="select * from pakainfo where mst_id=1";
$stmt = sqlsrv_query( $conn, $query );
$data=array();
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
    $data[]=$row;
}

Example

Dynemically HTML table from AJAX response using PHP 0

Dynemically HTML table from AJAX response using PHP

Dynemically HTML table from AJAX response using PHP

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.Dynemically HTML table from AJAX response using PHP

How to output the response HTML data by a jQuery AJAX request

dataType

  • “xml”
  • “html”
  • “script”
  • “json”
  • “jsonp”
  • “text”

$('#selectidget').on('change', function(e) {
var userId = 'action=filter_product&fillproduct='+this.value; 
e.preventDefault();
filterdt(userId);	
});

function filterdt(userId) {
	jQuery.ajax({

		url: 'functions.php',
		type: 'POST', 
		data: userId,
		dataType: 'html', 
		success: function(data){
			$("#display_result").html(data);
			console.log(data);
		},
		error: function(data){
			console.log(data);
		} 
	});
}

Parse json & html data from ajax response

$.ajax({
  url: 'response.php',
  type: 'POST',
  dataType: 'html',
  data: useriddata,
}).done(function ( data ) {
  $('#product rollax table tbody').append(data);
});

display text data in html table using jquery

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#getData").click(function(){
        $.ajax({url: "mydatafile.txt", success: function(result){
            $("#dataresult").html(result);
        }});
    });
});
</script>
</head>
<body>
<div id="dataresult"><h2>Call the jquery ajax change and data put</h2></div>
<button id="getData">External file get data</button>
</body>
</html>

Example

We hope you get an idea about Dynemically HTML table from AJAX response using PHP
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.

Export data mysql table to csv file using PHP 0

Export data mysql table to csv file using PHP

Export data mysql table to csv file using PHP

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.In My Export data mysql table to csv file using PHP

How to Import and Export CSV Files Using PHP and MySQL

// download invoice csv sheet
if ($action == 'download_csv'){

	header("Content-type: text/csv"); 

	// any output any to connection error display
	if ($mysqli->connect_error) {
		die('Error : ('.$mysqli->connect_errno .') '. $mysqli->connect_error);
	}
 
    $fname = 'invoice-data-'.date('d-m-Y').'.csv';   // simple file name
    $fileuserpath = 'downloads/'.$fname; // here file path put

	$file = fopen($fileuserpath, "w"); // php file handling to open a file in write mode
    chmod($fileuserpath, 0777);    //php file handling to set the file permission

    $query_table_columns = "SELECT * 
									FROM products i
									JOIN users c
									ON c.productname = i.productname
									WHERE i.productname = c.productname
									ORDER BY i.productname";

    if ($result_column = mysqli_query($mysqli, $query_table_columns)) {

    	// fetch the table fields data in mysql
        while ($column_data = $result_column->fetch_row()) {

            $collumdata = array();
            foreach($column_data as $data) {
                $collumdata[] = $data;
            }

            // her Format array like as CSV data and write to all file pointer
            fputcsv($file, $collumdata, ",", '"');
        }

	}

 }

$result_data = mysqli_query($con, 'SELECT * FROM productmst');
$row_data = mysqli_fetch_array($result_data, MYSQLI_ASSOC);

$fipeopen = fopen('myfile.csv', 'w');

foreach ($row_data as $val) {
    fputcsv($fipeopen, $val);
}

fclose($fipeopen);

Complete PHP Code to Export MySQL Data to CSV File

<?php
    //simple mysql database connection using php details
    $host = "localhost";
    $username = "root";
    $password = "db**898**";
    $dbname = "products";

    // simple data open connection to mysql database using php
    $connection = mysqli_connect($host, $username, $password, $dbname) or die("data Connection Error " . mysqli_error($connection));
    
    //here query using php to fetch mysql table rows data
    $sql_query = "select * from products";
    $result = mysqli_query($connection, $sql_query) or die("Database table Selection Error " . mysqli_error($connection));

    $fp = fopen('products.csv', 'w');

    while($row = mysqli_fetch_assoc($result))
    {
        fputcsv($fp, $row);
    }
    
    fclose($fp);

    //your file close the db (database) connection
    mysqli_close($connection);
?>

Create Dynamic Web Pages using PHP-MYSQL 0

Create Dynamic Web Pages using PHP-MYSQL

Create Dynamic Web Pages using PHP-MYSQL

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.

index.php

<?php
$myFileName = "filename.html"; // or .php file  or .css file genrated
$fh = fopen($myFileName, 'w'); // or die("error");  
$stringData = "
<?php include('config.php');?>
<?php include('header.php');?>
<?php include('sidebarmenu.php');?>
<p>
<ul>
<li>how to create dynamic web pages using php & mysql</li>
<li>php generate html page</li>
<li>how to create dynamic pages in php</li>
<li>how to generate a html page dynamically using php</li>
<li>php dynamic page content</li>
<li>php dynamic website source code</li>
<li>using php to generate html</li>
<li>how to create a dynamic website in php step by step pdf</li>
</ul>
</p>
<?php include('footer.php');?>
";   
fwrite($fh, $stringData);
?>

Output : filename.html

Automatically This index.php file run to create a filename.html or filename.php genrated dynamically.

<?php include('config.php');?>
<?php include('header.php');?>
<?php include('sidebarmenu.php');?>
<p>
<ul>
<li>how to create dynamic web pages using php & mysql</li>
<li>php generate html page</li>
<li>how to create dynamic pages in php</li>
<li>how to generate a html page dynamically using php</li>
<li>php dynamic page content</li>
<li>php dynamic website source code</li>
<li>using php to generate html</li>
<li>how to create a dynamic website in php step by step pdf</li>
</ul>
</p>
<?php include('footer.php');?>

dynamically generate simple links

PHP script to dynamically generate simple links to the files present in current directory

<?php
$dir_open = opendir('.');

while(false !== ($fname = readdir($dir_open))){
    if($fname != "." && $fname != ".."){
        $link = "<a href='./$fname'> $fname </a><br />";
        echo $link;
    }
}

closedir($dir_open);
?>

<? //Generate simple text file on the fly using php

   header("Content-type: text/plain");
   header("Content-Disposition: attachment; filename=myfile.txt");

   // do your Db dynamic content into $result
   print "how to create dynamic web pages using php & mysql\n";
   print $result;
 ?>
 

Pakainfo.com