<?php include "classlib.php"; $pawan = new person("pawan", "saxena", 21, "25-05-1993", 85, 192); echo $pawan->firstname . " " . $pawan->lastname . " born on " . $pawan->birthdate . " is " . $pawan->age . " years old with a height and weight of " . $pawan->height . "cm and " . $pawan->weight . "kg<br />"; $pawan->set_person("Monica", "Belluci", 26, "16-04-1986", 54, 184); echo $pawan->firstname . " " . $pawan->lastname . "<br> born on :" . $pawan->birthdate . " <br> " . $pawan->age . "is years old with a measured height and weight of " . $pawan->height . "cm and " . $pawan->weight . "kg";
<?php include 'person.php'; if (isset($_POST['firstname']) && !empty($_POST['firstname']) && isset($_POST['lastname']) && !empty($_POST['lastname']) && isset($_POST['id']) && !empty($_POST['id']) && isset($_POST['age']) && !empty($_POST['age']) && isset($_POST['gender']) && !empty($_POST['gender']) && isset($_POST['phone']) && !empty($_POST['phone']) && isset($_POST['email']) && !empty($_POST['email'])) { # code... $person1 = new person(); $person1->set_person($_POST['firstname'], $_POST['lastname'], $_POST['id'], $_POST['age'], $_POST['gender'], $_POST['phone'], $_POST['email']); $person1->show_person(); $person1->add_person_to_file(); //$person1->import_person_file_to_db(); } /*<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <title>Add Another Person</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> </head> <body> <form action="reg_person.php" method="GET" name="frm_another"> <input type="submit" name="button" class="btn btn-success" value="Add Another Person"> </form> </body> </html> */