Hi,
I would like to use eregi so i can immediately check if data submitted is in the correct format. In this case, i'd like to make sure the the value for 'kool' is composed of a set of 8-digit numbers.
// Get bookcode and process data
if (eregi('[0-9]{8})$', $_GET['kool'])) {
$bookcode = $_GET['ac'];
// echo the book code
ehco 'the book code is ' . $bookcode;
} else {
$bookcode = 'none';
echo 'invalid book code';
}
I need help. Im new to this. Please tell me what's wrong and how I can fix it.
Thanks!