hip1/11.5/page3.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php $f_name = $_POST['f_name']; $m_name = $_POST['m_name']; $l_name = $_POST['l_name']; $birthdate = $_POST['birthdate']; $gender = $_POST['gender']; $country = $_POST['country']; $book1 = $_POST['book1']; $book2 = $_POST['book2']; $book3 = $_POST['book3']; $book4 = $_POST['book4']; $book5 = $_POST['book5']; echo "<div>First name: $f_name</div>"; if($m_name){ echo "<div>Middle name: $m_name</div>"; } echo "<div>Last name: $l_name</div> <div>Date of birth: $birthdate</div> <div>Gender: $gender</div> <div>Country: $country</div>"; if($book1){ echo "<div>Book 1: $book1</div>"; } if($book2){ echo "<div>Book 2: $book2</div>"; } if($book3){ echo "<div>Book 3: $book3</div>"; } if($book4){ echo "<div>Book 4: $book4</div>"; } if($book5){ echo "<div>Book 5: $book5</div>"; } ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse