本文整理汇总了PHP中utility::form_errors方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::form_errors方法的具体用法?PHP utility::form_errors怎么用?PHP utility::form_errors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility
的用法示例。
在下文中一共展示了utility::form_errors方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlencode
include "../includes/layouts/header.php";
?>
<div id = "content-wrap">
<?php
include "../includes/layouts/navigation.php";
?>
<div id = "main">
<div id="profile">
<h2>Create Page</h2>
<?php
//handle error and message.
echo session::message();
echo utility::form_errors(validation::$errors);
$session_errors = session::errors();
echo utility::form_errors($session_errors);
?>
<form action="create_page.php?subject=<?php
echo urlencode($current_subject["id"]);
?>
" method="post">
<p>Menu name: <input type="text" name="menu_name" value="" /> </p>
<p>Position:
<select name="position">
<?php
echo page::find_page_position(true);
// create page need true param
?>
</select>
示例2: htmlentities
<?php
include "../includes/layouts/header.php";
?>
<div id = "content-wrap">
<?php
include "../includes/layouts/navigation.php";
?>
<div id = "main">
<div id="profile">
<?php
echo session::message();
?>
<?php
echo utility::form_errors(validation::$errors);
?>
<h2>Edit Page:<?php
echo htmlentities($current_page["menu_name"]);
?>
</h2>
<form action="edit_page.php?page=<?php
echo urlencode($current_page["id"]);
?>
" method="post">
<!-- The display part above -->
<p>Belong Subject:
<select name="belong_subject">
示例3:
<?php
include "../includes/layouts/navigation.php";
?>
<div id = "main">
<div id="profile">
<?php
echo session::message();
?>
<?php
$errors = session::errors();
?>
<?php
echo utility::form_errors($errors);
?>
<h2>Create Subject</h2>
<form action="create_subject.php" method="post">
<p>Menu name: <input type="text" name="menu_name" value="" /></p>
<p>Position:
<select name="position">
<?php
echo subject::find_subject_position(true);
//param true means edit subject
?>
</select>
</p>