开发者

Customized User Registration Form

开发者 https://www.devze.com 2022-12-29 00:21 出处:网络
i have made user-register.tpl.php file. And i have set many text field in that. But now i need that....

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,开发者_Go百科 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


<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 } ?>
0

精彩评论

暂无评论...
验证码 换一张
取 消