rianto isaac's Weblog

rianto utomo isaac sahala utomo

php, Character type checking

leave a comment »

 

//3 pertama harus huruf
$huruf = strtoupper(substr(trim($_POST[cust]), 0, 3));
//echo $text;
if (ctype_alpha($huruf)) {
$hurufvalid = 1;
} else {
$hurufvalid = 0;
}if ($hurufvalid == 0) {
echo “<font size=’-1′>(<a href=’../custadd.php’>, nomor customer tidak sesuai…</a>)</font>”;
echo “<meta http-equiv=\”refresh\” content=\”3;../custadd.php\”>”;
exit;
}

Written by isaaconi

November 23, 2011 pada 8:47 am

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: