isbn - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of isbn.php

  1. <?php
  2.     if (filter_input(INPUT_POST, 'registreren')) {
  3.         $isbn = filter_input(INPUT_POST, 'isbn', FILTER_VALIDATE_REGEXP, ['options' => ['regexp'=>"/^[0-9]{3}-[0-9]{2}-[0-9]{3}-[0-9]{4}-[0-9]$/"]]);
  4.         var_dump($isbn);
  5.     }
  6. ?>
  7.  
  8. <form action="" method="post">
  9.         <label>ISBN: <input type="text" name="isbn" pattern="^[0-9]{3}-[0-9]{2}-[0-9]{3}-[0-9]{4}-[0-9]$" placeholder="XXX-XX-XXX-XXXX-X"></label>
  10.     <input type="submit" value="Verzenden" name="registreren">
  11. </form>
File Description
  • isbn
  • PHP Code
  • 19 Feb-2020
  • 493 Bytes
You can Share it: