Skip to content

Instantly share code, notes, and snippets.

View sahanpasindu's full-sized avatar
🏠
Working from home

Sahan Pasindu Nirmal sahanpasindu

🏠
Working from home
View GitHub Profile
@fgilio
fgilio / remove-onclick.js
Created September 29, 2016 16:01
Remove onclick attribute from DOM element
document.getElementById('remove-onclick').removeAttribute("onclick");
@abedsujan
abedsujan / PHP Form Validation
Created February 12, 2012 20:39
PHP::Basic form validation using PHP (username, number, string, email)
<?php
/**
* This function can be used to check the sanity of variables
*
* @access private
*
* @param string $type The type of variable can be bool, float, numeric, string, array, or object
* @param string $string The variable name you would like to check
* @param string $length The maximum length of the variable
*