11 Apr 2014
0.71K
No Comments

Some of designer when they slice layout they create form submit button with a anchor tag and href=”hashtag” and then users cannot able to submit form when they press enter in form fields, I have wrote little code to submit even from don’t have a input type submit button, and

Post in

11 Apr 2014
0.34K
No Comments

We always avoid to use in-line #css in elements and now also avoid to use in-line #javascript events like onclick=”window.location=’http://www.sdtuts.com’;” on elements, and you most need to make element, div redirectable, and maybe we cannot add all of elements in under of #anchor #tag example [html] <a href="redirect to url">

Post in

6 Apr 2014
0.66K
No Comments

in #MySQL cannot do it with any compression operator to check case sensitive value in column, so first convert your value into hash and compare with column value see code example how to do it. Here is example of table case_sensitive_col_id case_sensitive_col_val 1 SDTUTS.com 2 SDTuts.com 3 Sdtuts.com Using SHA1

Post in

2 Apr 2014
0.9K
No Comments
Protect your wordpress wpadmin panel

users can easily access or hacker’s programmed bots will send login request to your yoursite.com/wp-login page, but #wordpress have a good security with admin login panel, I have a wrote little code using #wordpress #hooks to prevent from other all users from your site wordpress wp admin login page. Prevent

Post in

11 Mar 2014
0.9K
No Comments
Keycodes in javascript

I have defined variables of keycodes from laptop keyboard, copy codes and use in your code line, and defined for developer and designer to easily use  who don’t want to know the keyCode. Minified variables [javascript] var escape=27,f1=112,f2=113,f3=114,f4=115,f5=116,f6=117,f7=118,f8=119,f9=120,f10=121,f11=122,f12=123,print_sc=44,insert=45,del=46,home=36,end=35,pgup=33,pgdn=34,backticks=192,key_1=49,key_2=50,key_3=51,key_4=52,key_5=53,key_6=54,key_7=55,key_8=56,key_9=57,key_0=48,minus=189,plus=187,backspace=8,tab=9,q=81,w=87,e=69,r=82,t=84,y=89,u=85,i=73,o=79,p=80,bracketleft=219,bracketright=221,backslash=220,caps=20,a=65,s=83,d=68,f=70,g=71,h=72,j=74,k=75,l=76,coln=186,quotes=222,enter=13,shift=16,z=90,x=88,c=67,v=86,b=66,n=78,m=77,comma=188,dot=190,slash=191,ctrl=17,start=91,alt=18,space=32,leftarrow=37,toparrow=38,rightarrow=39,downarrow=40,numlock=144,numpadslash=111,numasterisk=106,numminus=109,numplus=107,numdot=110,num0=96,num1=97,num2=98,num3=99,num4=100,num5=101,num6=102,num7=103,num8=104,num9=105; [/javascript] First define variables [javascript] var escape=27; var f1=112; var f2=113; var

Post in

11 Mar 2014
0.73K
No Comments

Define array to for shuffle keys [php]$numbers = array( ‘one’ => ‘one_1′ ,’two’ => ‘two_2′ ,’three’ => ‘three_3′ ,’four’ => ‘four_4′ ,’five’ => ‘five_5′ ,’six’ => ‘six_6′ ,’seven’ => ‘seven_7′ ,’eight’ => ‘eight_8′ ,’nine’ => ‘nine_9′ ,’ten’ => ‘ten_10’ ); [/php] Define array indexes to get random keys in while

Post in

11 Mar 2014
0.31K
No Comments

[php] $numbers = array( ‘one’ => ‘one’ ,’two’ => ‘two’ ,’three’ => ‘three’ ,’four’ => ‘four’ ,’five’ => ‘five’ ,’six’ => ‘six’ ,’seven’ => ‘seven’ ,’eight’ => ‘eight’ ,’nine’ => ‘nine’ ,’ten’ => ‘ten’ ); foreach($numbers as $num_key=>$num_val){ $array_keys[$num_key] =$num_key; } //RESULT Array ( [one] => one [two] => two

Post in

10 Mar 2014
0.6K
No Comments
Develop code testing system on your localhost

Its hard to test your small code or function on files, because these serve our time to open files and write code save with die or exit in the file and then go to browser for testing, or we go to online php testing tools, but online php testing tools

Post in

10 Mar 2014
0.69K
No Comments

Sometimes we want call a function if user pressed two keys together at the same time. Like Shift+Enter, CTRL+S  more others, I wrote a little code how to call a function if user pressed two keys. copy keys name from another post to use easily with key names. [javascript] var

Post in

10 Mar 2014
0.39K
No Comments

1.Remove duplicate values from array – ARRAY_UNIQUE [php] $array = array(0,1,2,3,3,4,5,5,7,8,7,7); $array = array_unique($array); [/php] Result [php] Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [5] => 4 [6] => 5 [8] => 7 [9] => 8 ) [/php] 2.Re-order with random values from

Post in