- Output for git.master, git.master_jit, rfc.property-hooks
- $isbn = $_POST['ISBN'];$title = trim($_REQUEST['title']);$description = trim($_REQUEST['description']);$price = trim($_REQUEST['price']);$publisher = trim($_REQUEST['publisher']);$pubdate = trim($_REQUEST['pubdate']);$edition = trim($_REQUEST['edition']);$pages = trim($_REQUEST['pages']);$catname = trim($_REQUEST['CategoryName']);$firstname = trim($_REQUEST['strFName']);$lastname =trim( $_REQUEST['strLName']);////////////////////////////////////////////////////////////////$errors = array(); if (!preg_match ('/^[0-9]+{13}&/', $isbn)) {$errors[] = 'ISBN must be numeric and 13 characters long';} if (empty($_POST["title"])) {$errors[] = 'Title cannot be empty';} if (empty($_POST["description"])) {$errors[] = 'Description cannot be empty';} if (!preg_match ('/^$[0-9\.]&/', $price)) {$errors[] = 'Price must be in $USD';} if (empty($_POST["publisher"])) {$errors[] = 'Publisher cannot be empty';} if (!preg_match ('!^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d!', $pubdate)) {$errors[] = 'Date must be in dd-mm-yyyy';} if (!preg_match ('/^[0-9]{2}$/', $edition)) {$errors[] = 'Edition must be numeric and 2 digits long';} if (!preg_match ('/^[0-9]$/', $pages)) {$errors[] = 'Pages must be numeric';} if (empty($_POST["catname"])) {$errors[] = 'Category cannot be empty';} if (empty($_POST["firstname"])) {$errors[] = 'First Name cannot be empty';} if (empty($_POST["lastname"])) {$errors[] = 'Last Name cannot be empty';} if (empty($errors)) { $sql_ba = "INSERT INTO bookauthors (strFName, strLName) values('$firstname', '$lastname');"; $sql_bd = "INSERT INTO bookdescriptions (ISBN, title, description, price, publisher, pubdate, edition, pages) values('$isbn', '$title', '$description', '$price', '$publisher', '$pubdate', '$edition', '$pages');"; $sql_bab = "INSERT INTO bookauthorsbooks (ISBN, AuthorID) values('$isbn', LAST_INSERT_ID());"; $sql_bc = "INSERT INTO bookcategories (CategoryName) values('$catname');"; $sql_bcb = "INSERT INTO bookcategoriesbooks (CategoryID, ISBN) VALUES(LAST_INSERT_ID(), '$isbn');"; $sql = $sql_ba . $sql_bd . $sql_bab . $sql_bc . $sql_bc; echo $sql; $success = ''; if(mysqli_multi_query($conn, $sql)) { do { $success+=mysqli_affected_rows($conn); } while (mysqli_more_results($conn) && mysqli_next_result($conn)); } if ($success == 5) { echo "All records have been successfully inserted"; } } else { echo '<h1>Error!</h1> <p style="color:red;">The following error(s) occurred:<br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } echo '</p><p>Please try again.</p>'; }/////////////////////////////////////////////////////////////////} mysqli_close($conn);?><form action="insertbook.php" method="post"> <fieldset><legend>Enter your information in the form below:</legend> <div id="field"> <label for="ISBN">ISBN: </label> <input type="text" name="ISBN" value=""/> </div> <div id="field"> <label for="title">Title: </label> <input type="text" name="title" value=""/> </div> <div id="field"> <label for="description">Description: </label> <input type="text" name="description" value=""/> </div> <div id="field"> <label for="price">Price: </label> <input type="text" name="price" value=""/> </div> <div id="field"> <label for="publisher">Publisher: </label> <input type="text" name="publisher" value=""/> </div> <div id="field"> <label for="pubdate">Publish Date: </label> <input type="text" name="pubdate" value=""/> </div> <div id="field"> <label for="edition">Edition: </label> <input type="text" name="edition" value=""/> </div> <div id="field"> <label for="pages">Pages: </label> <input type="text" name="pages" value=""/> </div> <div id="field"> <label for="CategoryName">Category Name: </label> <input type="text" name="CategoryName" value=""/> </div> <div id="field"> <label for="strFName">Author First Name: </label> <input type="text" name="strFName" value=""/> </div> <div id="field"> <label for="strLName">Author Last Name</label> <input type="text" name="strLName" value=""/> </div> <br> <input id="submit" type="submit" value="Submit" name="submit"> </fieldset></form> Warning: include(): open_basedir restriction in effect. File(footer.html) is not within the allowed path(s): (/tmp:/in:/etc) in /in/mPP9g on line 1 Warning: include(footer.html): Failed to open stream: Operation not permitted in /in/mPP9g on line 1 Warning: include(): Failed opening 'footer.html' for inclusion (include_path='.:') in /in/mPP9g on line 1 ERROR
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches
Archived branches
Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
- 2020-03-21 RFC: Is_Literal - declined
- 2020-12-04 Enumerations - included in PHP 8.1
- 2018-06-15 Typed Properties v2 - implemented in PHP 7.4
- 2016-08-12 Object typehint - included in PHP 7.2
- 2016-08-14 Arrow functions - withdrawn
- 2016-05-29 array_change_keys() - withdrawn
- 2016-04-19 Lexical scope support for anonymous classes - suspended
- 2016-04-17 Functional Interfaces - declined
- 2016-03-16 Typed Properties - superseded in favor of Typed Properties 2.0
- 2015-08-27 Callable Prototypes - declined
- 2015-05-01 Short Closures - declined / withdrawn in favor of Arrow Functions
- 2015-02-18 Scalar type hints v5 - included in PHP 7
- 2015-02-14 Union Types - declined
- 2013-09-22 Anonymous classes - included in PHP 7