當前位置: 首頁>>代碼示例>>PHP>>正文


PHP utility::form_errors方法代碼示例

本文整理匯總了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>
開發者ID:vincentywang,項目名稱:simplenote,代碼行數:31,代碼來源:create_page.php

示例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">
開發者ID:vincentywang,項目名稱:simplenote,代碼行數:31,代碼來源:edit_page.php

示例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>
開發者ID:vincentywang,項目名稱:simplenote,代碼行數:30,代碼來源:create_subject.php


注:本文中的utility::form_errors方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。