Notice (8): file_put_contents(): Write of 270 bytes failed with errno=28 No space left on device [CORE/src/Log/Engine/FileLog.php, line 140]

Notice: file_put_contents() [function.file-put-contents]: Write of 1108 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 4079 of 4085 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2758 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2074 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2098 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2074 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2098 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): SplFileObject::fwrite() [<a href='https://secure.php.net/splfileobject.fwrite'>splfileobject.fwrite</a>]: Write of 104 bytes failed with errno=28 No space left on device [CORE/src/Cache/Engine/FileEngine.php, line 141]

Notice: file_put_contents() [function.file-put-contents]: Write of 2791 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (512): long cache was unable to write 'f1ca5476d281cafa1e065f3cb7f10ca2' to Cake\Cache\Engine\FileEngine cache [CORE/src/Cache/Cache.php, line 275]

Notice: file_put_contents() [function.file-put-contents]: Write of 2586 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): SplFileObject::fwrite() [<a href='https://secure.php.net/splfileobject.fwrite'>splfileobject.fwrite</a>]: Write of 96 bytes failed with errno=28 No space left on device [CORE/src/Cache/Engine/FileEngine.php, line 141]

Notice: file_put_contents() [function.file-put-contents]: Write of 2790 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (512): long cache was unable to write 'e9eb7463b1fef93d12e56a77ff5ee059' to Cake\Cache\Engine\FileEngine cache [CORE/src/Cache/Cache.php, line 275]

Notice: file_put_contents() [function.file-put-contents]: Write of 2586 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 4067 of 4085 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2488 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
PHP页面间传递参数实例代码 - 站长搜索
首页 > 资讯列表 > 编程/数据库 >>

PHP页面间传递参数实例代码

Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]
Notice: file_put_contents() [function.file-put-contents]: Write of 2422 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2446 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
">
Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2422 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2446 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
2014-12-14 07:54:03 转载来源: 网络整理/侵权必删

本文是一篇php开发的入门教材,主要为大家讲解的是php的页面间如何传递参数的方法,感兴趣的同学参考下. 从今天开始,我们进入了系统制作中最基础但也是最关键的php增删查找功能介绍阶段了。 首先给大家介绍如何通过表单传值查询数据

本文是一篇php开发的入门教材,主要为大家讲解的是php的页面间如何传递参数的方法,感兴趣的同学参考下.

从今天开始,我们进入了系统制作中最基础但也是最关键的php增删查找功能介绍阶段了。

首先给大家介绍如何通过表单传值查询数据。

任务目标:在表单中输入部门名,查询出相应部门的人员信息。

先创建search.php文件。

第一步,插入一表单,在其中包含一个输入框,一个提交按钮。search.php文件内容如下所示:


<html>
<head>
</head>
<body>
<h3>Search</h3>
<form action="search_result.php" method="POST">
Depart Name:<input type="text" size=25 name="depart" value=""><br><br>
<input type="submit" name="submit" value="Search">
</form>
</body>
</html>


这样,我们就得到了一个数据提交页面,其含义就是,当我们点击Search按钮时,系统将名字为depart的输入框中所输入的数据通过Post的方法传递给search_result.php文件。

第二步,既然之前我们已经把值传送了出来,那么我们就要创建另一个页面文件来接收这一值。因为之前已经指定了是传送给search_result.php,那么我们就新建一个名为search_result.php的文件。

在这个文件中,首先连接上数据库并选择好数据源:

<?php  
$link=mysql_connect("localhost","root","之前的管理员密码");  
if(! $link) echo "没有连接成功!";  
else echo "连接成功!";  
mysql_select_db("infosystem", $link);
?>

其次,接收search.php文件发出的参数,并生成SQL查询语句:


<?php
$depart=$_POST["depart"];
$q = "SELECT * FROM info where depart='$depart'";
?>

最后,执行SQL语句并显示数据:


<?php
mysql_query("SET NAMES GB2312");
$rs = mysql_query($q, $link);
echo "<table>";
echo "<tr><td>部门</td><td>姓名</td></tr>";
while($row = mysql_fetch_object($rs)) echo "<tr><td>$row->depart</td><td>$row->ename</td></tr>";
echo "</table>";  

mysql_close($link);
?>

通过查询,是不是得到大家所需要的数据了呢?当然,这只是一个最最基本的例子,接下来的几个话题,我会接着查询数据这个问题继续补充说明。

 


标签: PHP 页面 传递 参数 实例 代码


声明:本文内容来源自网络,文字、图片等素材版权属于原作者,平台转载素材出于传递更多信息,文章内容仅供参考与学习,切勿作为商业目的使用。如果侵害了您的合法权益,请您及时与我们联系,我们会在第一时间进行处理!我们尊重版权,也致力于保护版权,站搜网感谢您的分享!

站长搜索

http://www.adminso.com

Copyright @ 2007~2025 All Rights Reserved.

Powered By 站长搜索

打开手机扫描上面的二维码打开手机版


使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

站长搜索目录系统技术支持