0
Count distinct records or values and display it using mysql and php
This tutorial shows you how to count unique records with mysql and display it using php. Very simple to understand.
This line
count(<COLUMN_NAME>) AS count_me
simply means that the count value is assigned to variable count_me and we...
IE compatibility view force Internet Explorer to use Internet Explorer 7 rendering mode
IE compatibility view force Internet Explorer to use Internet Explorer 7 rendering mode.My website was having issues in the way it was displaying in Internet Explorer 8, only compatibility view was working fine.So inorder to automatically render...
Sort MYSQL data according to the date in php or mysql itself
Sort the data from mysql using date.
If you have a field inside mysql for DATE and you need to sort the data accordingly in ascending or descending order you can use this UNIX_TIMESTAMP(FIELD NAME).
You can even update your existing SQL TYPE...
Load webpage dynamically from query string using simple javascript and iframe
Load webpage dynamically from uri or query string using simple javascript and iframe, this is very simple and easy to approach. Here is the javascript.
window.onload = function setIframe() {
var url = window.location.href;
var uri = url.indexOf("?uri=");
if(...
Set xampp:- Apache Mysql Filezilla Mercury Tomcat as a windows service and get xampp to start automatically on boot up
Set xampp- Apache,Mysql, Filezilla, Mercury and Tomcat as a windows service and get xampp to start automatically on boot up.
For this first we need to install xampp on windows. Refer this LINK ON HOW TO INSTALL XAMPP or we have a set of tutorials...
Change webpage title dynamically using jquery
This is a simple script that will change the webpage title dynamically using jquery.
Customize it according to your requirement.Jquery knowledge is essential to understand the code below. Any doubts do get back to me Happy Coding!!!!
<title>Title...
Redirect webpage using php
Redirect webpage after a specific time delay using php.We have html code for redirecting one webpage to another.But here we have php for doing the same. We can even give a delay of our choice inside the code. Grab the code here.
< ?php header("refresh:3;url=redirected.htm");?>
Put...
Zoom in and zoom out image using jquery
This scripts demonstrates how to Zoom in and zoom out image using jquery when you move mouse over the image.
<title>Move mouse on image to Zoom In and Zoom Out</title>
<script type="text/javascript" src="http://demo.mistonline.in/jquery-1.2.3.min.js"></script>
<script...
Read text file reverse using php
Read text file reverse using php
$file = file('text.txt');
$read_rev = array_reverse($file);
$count=0;
foreach ($read_rev as $dis_line) {
print_r($dis_line);
echo "<br />";
}
Demo
VN:F [1.9.13_1145]please wait...Rating: 2.0/10...
Send mail to admin or website owner when ever the logs show 404 or 500 or 401 or 400 error codes
Send an mail to admin or website owner when ever the logs show 404 or file not found error.This script can be used as a cron and is run on everyday basis to get all the details in your email.You can modify the code URI accordingly to get different...
Date in title bar using php
This is a simple script that appends date inside the html title tag.
<title>Today is < ?php print date("l"); print(", "); print date("d/M/y");?></title>
VN:F [1.9.13_1145]please wait...Rating:...
Setup a smtp server on your localsystem or server using hmailserver and send email
Setup a smtp server on the system, if you are running on windows use hmailserver and configure it and send any number of mails.
DOWNLOAD HMAIL SERVER HERE
a)Select the default...
Replace a string in a text or php file and save it using php
Replace a string in a text or php file and save it using php. A very simple example.Here test_file.php is the php file i am using to replace ip address inside that.
//read the entire string
$str=implode("",file('../test_file.php'));
$fp=fopen('../test_file.php','w');
//replace...
