define('DISALLOW_FILE_MODS',true);
Disable Plugin and Theme Update and Installation
If you really want to disable Updates and Installations, you can block users from installing/updating themes and plugins through the dashbo...
If you really want to disable Updates and Installations, you can block users from installing/updating themes and plugins through the dashbo...
Access to plugin and theme code is available in the WordPress dashboard. You can do one thing to protect the site from trifile to disable t...
In this tutorial, i will share how to send Email from XAMPP (PHP). i use XAMPP 1.8.1 version .This has been tested by me and it worked. L...
Hi, in this tutorial we will discuss on current website url and current / working directory name First you can get the name of the websit...
Put this code in functions.php file <?php if ( ! function_exists( 'wp_pagination' ) ) : function wp_pagination () { glo...
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomStringValue = '';
for ($i = 0; $i < $length; $i++) {
$randomStringValue .= $characters[rand(0, strlen($characters) - 1)]; }
return $randomStringValue ;}
// Echo the random string.
echo generateRandomString();
function generateRandomString ( $length = 10 ) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ...
Just keep a counter, increment it in the loop, and if it's an odd number set class to odd, if even set class to even.
$result = "";
$count = -1;
while ( $row = mysql_fetch_assoc( $query) ) {
$class = $count++ % 2 === 0 ? "even" : "odd" ;
$href = $row["url"];
$text = $row["name"];
$output .= "<li class='{$class}'><a href='foo?id={$href}'>{$name}</a></li>";
}
echo "<ul>{$result}</ul>";
Just keep a counter, increment it in the loop, and if it's an odd number set class to odd, if even set class to even. $result = ...
<script>
jQuery(document).ready(function($) {
if (window.history && window.history.pushState) {
$(window).on('popstate', function() {
var hashLocation = location.hash;
var hashSplit = hashLocation.split("#!/");
var hashName = hashSplit[1];
if (hashName !== '') {
var hash = window.location.hash;
if (hash === '') {
alert('Back button was pressed.');
window.location='www.yourweburlhere.com';
return false;
}
}
});
window.history.pushState('forward', null, './#forward');
}
});
</script>
you can try this to redirect your own url when clicking browser back button <script> jQuery ( document ). ready ( function ( $ ) ...
You need to test for the negation of the Regular Expressions because you want the validation to alert upon failure,
(is_valid = !/^[0-9]+$/.test(x))
Example :-
<form action="" method="POST" name="cdp_form" id="cdp_form">
<input type="text" id="phone_number" name="phone_number" placeholder="Enter your phone number" maxlength="10" onkeyup="validateForm()">
<button type="submit" name="SEND" class="btn btn-brown">Send</button>
</form>
<?php echo $successmsg; ?>
<script>
//form validation
function validateForm()
{
var x=document.forms["cdp_form"]["phone_number"].value
if (x==null || x=="")
{
alert("Phone number field must be filled in");
cdp_form.phone_number.focus();
return false;
}
else if (is_valid = !/^[0-9]+$/.test(x))
{
alert("Phone number field must have numeric characters");
cdp_form.phone_number.focus();
return false;
}
}
</script>
You need to test for the negation of the Regular Expressions because you want the validation to alert upon failure, (is_valid = !/^[0-9]+$...
split - Split string into array by regular expression for Example : Parse a Date which may b delimited with dots, hypens or slashes- ...
$('html, body').animate({scrollTop:$(document).height()},'fast');
and change your speed as required in numerical or slow , fast. Here we use fast in example
And create jQuery function
$(document).ready(function() {
$('#yourId').click(function(){
$('html, body').animate({scrollTop:$(document).height()}, 'fast');
return false; });
});
And for body part
Use a link to an anchor tag e.g.<div id="<a href="#yourId"> oryourId">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> function bottomScroll() { $('html, body').animate({scrollTop:$(document).height()}, 'fast'); } function topScroll() { $('html, body').animate({scrollTop:0}, 'fast'); } </script>
Put this code in Header part:-
<a href="javascript:bottomScroll()">Bottom Scroll</a> <a href="javascript:topScroll()">Top Scroll</a>
This Javascript code will scroll the page bottom $( 'html, body' ).animate({scrollTop:$(document).height()}, 'fast' ); ...
Multiple selection of a drop down listbox by using onChange event trigger. HTML CODE <select id=p1 name=no_year onChange="sho...
Today's topic is :- The selected option of a drop down listbox by using onChange event trigger. The onChange event will trigger 1 Java...
Credit Card Type
|
Credit Card Number
|
American Express
|
378282246310005
|
American Express
|
371449635398431
|
American Express Corporate
|
378734493671000
|
Australian BankCard
|
5610591081018250
|
Diners Club
|
30569309025904
|
Diners Club
|
38520000023237
|
Discover
|
6011111111111117
|
Discover
|
6011000990139424
|
JCB
|
3530111333300000
|
JCB
|
3566002020360505
|
MasterCard
|
5555555555554444
|
MasterCard
|
5105105105105100
|
Visa
|
4111111111111111
|
Visa
|
4012888888881881
|
Visa
|
4222222222222
Note : Even though this number has a different character count than the other test numbers, it is the correct and functional number.
|
Processor-specific Cards
| |
Dankort (PBS)
|
76009244561
|
Dankort (PBS)
|
5019717010103742
|
Switch/Solo (Paymentech)
|
6331101999990016
|
Test Credit Card Account Numbers While testing, use only the credit card numbers listed here. Other numbers produce an error. Expirati...
<html> <body> <form action=" <? php $_SERVER [ 'PHP_SELF' ]; ?> " method="POST" enctype=...