php页面值回传 比如说一个注册页面 register.php 页面,我填完注册信息之后点击注册,如果注册失败,返回到注册页面。 我希望填的注册信息还保存在页面上面。急急急急急急急急........................ 各位大虾们帮帮忙解决下,在下感激万分。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 方法太多了,我随便写几个:一、if($sql==false){echo "<script>alert('失败');history.go(-1);</script>"}二、if($sql==false){echo "<script>alert('失败');localhost.href="register.php";</script>"} echo "<script>alert('false');history.back();</script>";//手写,具体LZ自己测试下 不好意思,没看到信息还要保存的要求,呵呵。如果这样,我有个很简单也很笨的方法:就是在表单中的value中写上<?php echo $_GET['username'];?> 如果失败,就写成if($sql==false){echo "失败";echo "<mate http-equiv='refresh' content='1 url=register.php?username=username&......'";} CI框架用set_value<input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" /> 要实现方法还是很多的,cookies ,session都可以啊~~ 一、if($sql==false){echo "<script>alert('失败');history.go(-1);</script>"}二、 if($sql==false){echo "<script>alert('失败');localhost.href="register.php";</script& gt;"} <?php setcookie("user", "用户名", time()+3600);?>//用这个方法好啦!<input name="user" type="text" value="<?php echo $user;?>" /> 楼上大虾们说的history.go(-1);localtion.herf;甚至php的Head函数的方法都试过了,不行呀,不能保留表单的原数据,至于cookeis,session,一个一个存觉得太麻烦了!有没有简单的呢? 最近想用php向指定excel(test.xls)表格中插入图片(sample.jpg),并将此修改后的excel保存,然后将其转换成pdf格式文档,不知如何实现,烦请高手赐教! 弱弱问下,这里有拿站高手么?? 怎么修改数组中的项? 关于PHP多图上传讨论! 请问下到哪里可以下载php博客模板? php去除html标签 对于php初学者来应该学习什么 authorize 接口出现错误,寻高手解决 关于PHP自助建站系统,有谁有源码吗? 【求助】分享到QQ空间,新浪微博 如何判断是分享成功还是分享失败? php页面值回传 准备着手写一个公交路线查询
一、if($sql==false){echo "<script>alert('失败');history.go(-1);</script>"}
二、if($sql==false){echo "<script>alert('失败');localhost.href="register.php";</script>"}
if($sql==false){echo "失败";echo "<mate http-equiv='refresh' content='1 url=register.php?username=username&......'";}
<input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" />
二、 if($sql==false){echo "<script>alert('失败');localhost.href="register.php";</script& gt;"}
<?php
setcookie("user", "用户名", time()+3600);
?>
//用这个方法好啦!<input name="user" type="text" value="<?php echo $user;?>" />