Create an account    
 home  
 
Web www.thaihealth.net
  You are here:> home>topics> Basic PHP > How to , when new user register to put more of their informations.! ©
Modify&Download: How to , when new user register to put more of their informations.!
Posted on Thursday, February 19 @ 12:54:03 GMT+7 by admin

Basic PHP

When you have new user registration , sometime you need more details like Yahoo MSN or ethnic , age , sex etc. This is a small hack for Your_Account for phpNUKE6.0-7.0 , let's try

 



open modules/Your_Account/index.php

***********

search for

 function new_user() {

..........

.........

}

(just above function pass_lost() {)

*************

and replace with

function new_user() {
    global $my_headlines, $module_name, $db, $gfx_chk;
    if (!is_user($user)) {
 mt_srand ((double)microtime()*1000000);
 $maxran = 1000000;
 $random_num = mt_rand(0, $maxran);
 include("header.php");
 OpenTable();
 echo "<center><font class="title"><b>"._USERREGLOGIN."</b></font></center> ";
 CloseTable();
 echo "<br> ";
 OpenTable();
 echo "<form action="modules.php?name=$module_name" method="post"> "
         ."<b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")<br><br> "
     ."<table cellpadding="0" cellspacing="10" border="0"> "
     ."<tr><td>"._NICKNAME.":</td><td><input type="text" name="username" size="30" maxlength="25"><font class="tiny">"._REQUIRED."</font> </td></tr> "
         ."<tr><td>"._EMAIL.":</td><td><input type="text" name="user_email" size="30" maxlength="255"><font class="tiny">"._REQUIRED."</font> </td></tr> "
//mod
     ."<tr><td>"._ICQ.":</td><td><input type="text" name="user_icq" size="20" maxlength="20"></td></tr> "
         ."<tr><td>"._AIM.":</td><td><input type="text" name="user_aim" size="20" maxlength="20"></td></tr> "       
         ."<tr><td>"._YIM.":</td><td><input type="text" name="user_yim" size="20" maxlength="20"></td></tr> "
         ."<tr><td>"._MSNM.":</td><td><input type="text" name="user_msnm" size="20" maxlength="20"></td></tr> "
         ."<tr><td>"._LOCATION.":</td><td><input type="text" name="user_from" size="25" maxlength="60" value="USA"></td></tr> "
         ."<tr><td>"._OCCUPATION.":</td><td><input type="text" name="user_occ" size="25" maxlength="60"></td></tr> "
         ."<tr><td>"._INTERESTS.":</td><td><input type="text" name="user_intrest" size="25" maxlength="255"></td></tr> "
         ."<tr><td>"._OPTION.":</td><td><INPUT TYPE="CHECKBOX" NAME="user_viewemail" VALUE="1"> "._ALLOWEMAILVIEW."</td></tr> "
     ."<tr><td>"._SIGNATURE.":</td><td><TEXTAREA NAME="user_sig" ROWS="6" COLS="45"></TEXTAREA></td></tr> "
 
//end
     ."<tr><td>"._PASSWORD.":</td><td><input type="password" name="user_password" size="11" maxlength="40"><font class="tiny">"._REQUIRED."</font> </td></tr> "
     ."<tr><td>"._RETYPEPASSWORD.":</td><td><input type="password" name="user_password2" size="11" maxlength="40"><br><font class="tiny">("._BLANKFORAUTO.")</font></td></tr> ";
 if (extension_loaded("gd") AND ($gfx_chk == 3 OR $gfx_chk == 4 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
     echo "<tr><td>"._SECURITYCODE.":</td><td><img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr> "
         ."<tr><td>"._TYPESECCODE.":</td><td><input type="text" NAME="gfx_check" SIZE="7" MAXLENGTH="6"></td></tr> "
         ."<input type="hidden" name="random_num" value="$random_num"> ";
 }
 echo "<tr><td colspan='2'> "
     ."<input type="hidden" name="op" value="new user"> "
         ."<input type="submit" value=""._NEWUSER.""> "
         ."</td></tr></table> "
     ."</form> "
     ."<br> "
         .""._YOUWILLRECEIVE."<br><br> "
         .""._COOKIEWARNING."<br> "
         .""._ASREGUSER."<br> "
     ."<ul> "
         ."<li>"._ASREG1." "
         ."<li>"._ASREG2." "
         ."<li>"._ASREG3." "
         ."<li>"._ASREG4." "
         ."<li>"._ASREG5." ";
 $handle=opendir('themes');
     while ($file = readdir($handle)) {
     if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) {
  $thmcount++;
     }
 }
 closedir($handle);
     if ($thmcount > 1) {
     echo "<li>"._ASREG6." ";
 }
 $sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'";
 $result = $db->sql_query($sql);
 while ($row = $db->sql_fetchrow($result)) {
     $custom_title = $row[custom_title];
     if ($custom_title != "") {
  echo "<li>"._ACCESSTO." $custom_title ";
     }
 }
 $sql = "SELECT title FROM ".$prefix."_blocks WHERE active='1' AND view='1'";
 $result = $db->sql_query($sql);
 while ($row = $db->sql_fetchrow($result)) {
     $b_title = $row[title];
     if ($b_title != "") {
  echo "<li>"._ACCESSTO." $b_title ";
     }
 }
 if (is_active("Journal")) {
     echo "<li>"._CREATEJOURNAL." ";
 }
 if ($my_headlines == 1) {
     echo "<li>"._READHEADLINES." ";
 }
     echo "<li>"._ASREG7." "
     ."</ul> "
         .""._REGISTERNOW."<br> "
         .""._WEDONTGIVE."<br><br> "
     ."<center><font class="content">[ <a href="modules.php?name=$module_name">"._USERLOGIN."</a> | <a href="modules.php?name=$module_name&amp;op=pass_lost">"._PASSWORDLOST."</a> ]</font></center> ";
 CloseTable();
 include("footer.php");
    } elseif (is_user($user)) {
 global $cookie;
 cookiedecode($user);
 userinfo($cookie[1]);
    }
}

 


blog this


blog this

More about phpbasic
· PHP5 Release candidate is out now, try!2004-03-23 12:22:54
· How to , when new user register to put more of their informations.!2004-02-19 12:54:03
· Thaihealthnews V2.02module-need calendar function2003-11-28 01:08:26
· here is a scoop for PHP. cool!2003-10-17 19:37:55

Comment Post
1  by
on Sunday, March 16 @ 19:52:32 GMT+7
< href="http://f.jsoftj.com/">URL blocked by staff منتديا&

Read the rest of this comment...


2  by
on Thursday, March 13 @ 01:00:19 GMT+7
< href="http://www.jsoftj.com/">URL blocked by staffجي سوف

Read the rest of this comment...


3  by gliila
on Saturday, January 26 @ 05:21:08 GMT+7
< href="http://gallery.newsit.es/">URL blocked by staff free wallpaper [gallery.newsit.es]


4  by artop
on Saturday, April 26 @ 04:49:21 GMT+7
< href="http://Forums.ar-top.com/">URL blocked by staffعرب تو

Read the rest of this comment...


5  by artop
on Saturday, April 26 @ 04:50:37 GMT+7
< href="http://Forums.ar-top.com/">URL blocked by staffعرب تو

Read the rest of this comment...


6  by artop
on Saturday, April 26 @ 04:52:52 GMT+7
< href="http://directory.ar-top.com/">URL blocked by staffدليل




Your Name:

[ New User ]

Subject:


Comment:

Allowed HTML:
<b> <i> <a> <em> <br> <strong> <blockquote> <tt> <li> <ol> <ul>
Security code:



T news tweak
 

       Sponsored Links
       Related Links
· More about Basic PHP
· News by admin


Most read story about Basic PHP:
 How to , when new user register to put more of their informations.!(8948)

       Article Rating
Average Score: 4.2
Votes: 5


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


       Options

 Printer Friendly  Printer Friendly

 Send to a Friend  Send to a Friend

News ©

เล่นเกมส์ arcade games free!

main sitethaihealth | home | forums | downloads | topics

Seo from our desk thai seo
Web site engine code is Copyright © 2003 by PHP-Nuke.Copyright 2007 Thaihealth and pattaya doctor
Page Generation: 0.178 Seconds

Theme developed by WebDesignHQ.com Modified By DoctorNUKE