本文整理匯總了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>