定制用户注册表

发布于 2024-08-31 07:06:30 字数 398 浏览 4 评论 0原文

我已经制作了 user-register.tpl.php 文件。我在其中设置了许多文本字段。
但现在我需要那个......
我想将用户信息存储到数据库中。 bcz 我已经创建了自定义注册页面,因此我需要将我的文本字段值存储在数据库中。
像这样......

Username:    <input type="text" name="myuser" id="myuser" />

现在我想存储用户名,它将输入到这个 myuser 文本字段中。


Nitish
Panchjanya Corporation

i have made user-register.tpl.php file. And i have set many text field in that.

But now i need that....

i want to store the users information to the database. bcz i have created the customized registration page, so i need that my text field values should be store in the database.
like this.......

Username:    <input type="text" name="myuser" id="myuser" />

Now i want to store the username, which will entered in this myuser text filed.


Nitish
Panchjanya Corporation

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

星軌x 2024-09-07 07:06:30
<form action="index.php" method="post" name="acc_info_form">
  Username:    <input type="text" name="myuser" id="myuser" /><br/>
  First Name:    <input type="text" name="name" id="name" /><br/>
  <input  type="submit"  value="Save"/>
</form>

索引.php

   //Here you have to write database connection and then
    <?PHP  if ( $_POST){  ?>
        mysql_query("INSERT INTO users (myuser, name) VALUES('".$_POST['myuser']."',".$_POST['name']."' )") or die(mysql_error());
    <?PHP } ?>
<form action="index.php" method="post" name="acc_info_form">
  Username:    <input type="text" name="myuser" id="myuser" /><br/>
  First Name:    <input type="text" name="name" id="name" /><br/>
  <input  type="submit"  value="Save"/>
</form>

index.php

   //Here you have to write database connection and then
    <?PHP  if ( $_POST){  ?>
        mysql_query("INSERT INTO users (myuser, name) VALUES('".$_POST['myuser']."',".$_POST['name']."' )") or die(mysql_error());
    <?PHP } ?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文