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...
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...
Agree Before Entry Using Javascript
Agree before entry using Javascript,with button disable functionality,that means if you agree, you can enter your name. But, if you disagree, you will not be able to enter or edit your name. When you disagree, the box is ‘locked.’...
Find screen resolution and redirect the user using javascript
This script helps you to find screen resolution of a client or user and redirect to a webpage using simple
<script LANGUAGE="JavaScript">
function resolution_finder() {
var url640x480 = "http://www.yahoo.com";
var...
Character Encoder And Decoder Using Javascript
This scripts encodes and decodes the character entered inside the textbox. Very useful for GET queries passed through URL.Encrypts a string by converting each character to it’s ASCII key code. Supports two-way encryption – from a...
Output buffering using ob_start in php
Output buffering using ob_start in php and saving it to a variable, this is a very good feature available in php mainly when we want to output and html data or php data
ob_start(); //Turn on output buffering ?>
Get this link <a href="http://www.mistonline.in">output...
Get browser language using php
In php you can get the language of your visitor, this is very helpful if you have many versions of your website for different languages.
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
echo "The browser language is ".$language;
VN:F...
