Month: October 2006

เช็คโค้ดเช็คบัตรประชาชน

เช็คโค้ดเช็คบัตรประชาชน

28 October 2006

<script language=”javascript”>
function makearray(n)
{
this.length=n;
for( var i=0; i < n ; i++)
this[i] = 0;
return this;
}
function chkIDcard(){
var xCheck = 0;
var g = 0;
var c = 0;
var totalX = 0;
var sumX = 0;
var x = new makearray(13);
var z=”0″;
var l=”0″;
if(form1.idCard.value.length !=13){
alert(’บัตรผิด ต้อง 13 ตัวเท่านั้น’);
return false;
}else
if ( form1.idCard.value.length > 1 )
{
for (var q=0; q<form1.idCard.value.length; ++q)
{
var codee=form1.idCard.value.charCodeAt(q);
// if (codee>=48 && codee<=57)continue ;
if [...]

How to update multiple rows in mysql with php

How to update multiple rows in mysql with php

25 October 2006

Here comes my first geeky php post. For people who have basic knowledge in updating mysql information through a php form, you’ll notice that almost all of the tutorials only tell you how to update ONE record at a time. Well, I figured it must be a simple tweak to update multiple records. Unfortunately, I [...]