当前位置: 首页>>代码示例>>PHP>>正文


PHP person::set_person方法代码示例

本文整理汇总了PHP中person::set_person方法的典型用法代码示例。如果您正苦于以下问题:PHP person::set_person方法的具体用法?PHP person::set_person怎么用?PHP person::set_person使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在person的用法示例。


在下文中一共展示了person::set_person方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: person

<?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";
开发者ID:pawans-optimus,项目名称:php_induction,代码行数:7,代码来源:test_classlib.php

示例2: person

<?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>
*/
开发者ID:programmerve,项目名称:POO,代码行数:25,代码来源:core.php


注:本文中的person::set_person方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。