if (isset($book_isbn)) { if ((!preg_match("/[0-9]{10}/", $book_isbn))) { die("Error - only ISBN numbers"); } }