Posts

Showing posts from December, 2012

install pear dan phpunit pada windows 7 + appserv

- C:\AppServ\php5\ - klik 2x "go-pear.bat" - ikuti semua instruksinya sampai selesai. buka command prompt lalu ketik : - pear channel-update pear.php.net - pear upgrade  lanjutkan dengan install phpunit : - pear config-set auto_discover 1 - pear install pear.phpunit.de/PHPUnit kode tambahan saat instalasi gagal : untuk reinstall phpunit : - pear install --alldeps --force phpunit/PHPUnit upgrade pear : - pear upgrade-all clear cache : - pear clear-cache php_pear_php_bin is not set correctly : ganti : SET "PHP_PEAR_PHP_BIN=.\php.exe" menjadi : SET "PHP_PEAR_PHP_BIN=C:\AppServ\php5\.\php.exe"

setting time_zone mysql

SET GLOBAL time_zone = 'Asia/Jakarta'

Validating array inputs using jquery validation plugin

Image
<script> $(document).ready(function(){ //save complaint $("#submitcomplaint").click(function(){ $("#fcomplaint").validate({ debug: false, showErrors: function(errorMap, errorList) { $(".errormsg").html($.map(errorList, function(el) { return el.message; }).join(", ")); }, wrapper: "span", rules: { 'complaintdesc[]': "required", }, messages: { 'complaintdesc[]': "please enter complaint description", }, submitHandler: function(form) { //$.post('updatecomplaint.php', $("#fcomplaint").serialize(), function(data) { // alert(data.pesan); ...