求助,高手进来帮忙下,谢谢!

ghwsxlj 2004-01-31 05:20:11
这个是用户资料的modify.php文件
需要用户修改自己的资料的用PHP写
1。先把用户原来的资料从member.txt读出来,读到下面的id,password,text文本框里等等
2。再修改读出来的信息,按提交键,覆盖掉原来的资料,保存到member.txt里

<?
session_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<body>
<table>
<tr><td colspan=2 align=center><b>Change Byeong Profile</b></td></tr>

<form name="form1" method="post" action="reg.php">
<tr><td width="98"><strong>ID</strong></td>
<td width="588"><? print "$visitor" ?></td></tr>
<tr><td><strong>Password</strong></td>
<td><input type="password" name="password1" id="password1" size="40"></td></tr>
<tr><td><strong>Re-Password</strong></td>
<td><input type="password" name="password2" id="password2" size="40"></td></tr>

<tr><td><strong>First Name</strong></td>
<td><input type="text" name="firstname" size="40"></td></tr>
<tr><td><strong>Last Name</strong></td>

<td><select name="state">
<option selected value="1">[Select State]</option>
<option value="2">Australia</option>
<option value="2">China</option>
</select>
</td></tr>

<tr>
<td height="24"><strong>Select Interest</strong></td>
<td><input type=checkbox name="example" value="1">Technology
<input type=checkbox name="example" value="2">Enterprise
<input type=checkbox name="example" value="3">Research
<input type=checkbox name="example" value="4">Government
<input type=checkbox name="example" value="5">People
<input type=checkbox name="example" value="6">Life Style
<input type=checkbox name="example" value="7">Opinion</td></tr>

<tr><td><strong>Question</strong></td>
<td><select name="q">
<option selected value="1">[Select Question]</option>
<option value="2">What was the name of your primary school?</option>
<option value="3">What is the street name where you born?</option>
<option value="4">What is your best friend name?</option>
<option value="5">What is your grand father's name?</option>
<option value="6">What is your grand mother's name?</option>
</select>
</td></tr>

<tr><td><strong>Answer</strong></td>
<td><input type="text" name="answer" size="38"></td></tr>

<td><input type="submit" name="Submit" value="Change Profile">
<a href="main.php?work=login" target="mainFrame" class="style2 style1"> Cancel</a></td>
</tr>

</form>
</table>

</body>
</html>

我不会做读的和保存的,ID的读法有错吗,请指点下,谢谢*^-^*
...全文
36 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ghwsxlj 2004-01-31
  • 打赏
  • 举报
回复
QQ加好完毕*^-^*
ccterran 2004-01-31
  • 打赏
  • 举报
回复
在phpx里发贴的也是你吗?怪可怜的~~(其实我都给你发sms了,你都收不到),我可以联系我qq:38396104 虽然不是高手,但是小问题都能解决

你发的程序中没有读的动作啊。先跟我讲讲member.txt里的数据格式是什么。然后如何判断该用户登陆的。知道这两个就好办了。
ghwsxlj 2004-01-31
  • 打赏
  • 举报
回复
UP~~
ghwsxlj 2004-01-31
  • 打赏
  • 举报
回复
提示下也好啊
谢谢了。~~
ghwsxlj 2004-01-31
  • 打赏
  • 举报
回复
up

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧