Welcome to Geeklog Wednesday, May 22 2013 @ 09:30 AM EDT
|
||||||||
![]() |
Forum Index > Support > General Geeklog Support |
New Topic
|
Post Reply
|
Add new field in new user register |
|||
| koalasoft |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() ![]() Status: offline ![]() Registered: 03/09/05 Posts: 236 |
Hi to all !!
I want to add a field but in the user registry, and who similarly is in the data base kept. . - The complete registry for the user Activates. . - In the data base agrege the Item " carrera" within the table gl_users. . - Within memberdetail.thtml I added a field but…. . PHP Formatted Code <td align="right" class="alignleft" style="vertical-align:middle;padding-left:10px;"><b>{FULLNAME}</b><br{xhtml}><small style="color:#676767">{FULLNAME_HELP}</small></td><td align="left" valign="middle"><input type="text" name="fullname" size="32" maxlength="80" value="{fullname}"{xhtml}></td> </tr> <!-- THIS IS MY NEW FIELD --> <tr> <td align="right" class="alignleft" style="vertical-align:middle;padding-left:10px;"><strong>{CARRERA}</strong><br{xhtml}><small style="color:#676767">{CARRERA_HELP}</small></td> <td> <select name="carrera" size="1" onchange="fnc(this)> <option value="Elegir" selected="selected"> <option value="ING. SISTEMAS COMPUTACIONALES">ING. SISTEMAS COMPUTACIONALES</option> <option value="ING. INDUSTRIAL">ING. INDUSTRIAL</option> <option value="ING. BIOQUIMICA">ING. BIOQUIMICA</option> <option value="ING. ELECTROMECANICA">ING. ELECTROMECANICA</option> <option value="ING. CIVIL">ING. CIVIL</option> <option value="LIC. ADMINISTRACION">LIC. ADMINISTRACION</option> <option value="DOCENTE">DOCENTE</option> <option value="PERSONAL DEL I.T.S.R.">PERSONAL DEL I.T.S.R.</option> <option value="EGRESADO">EGRESADO</option> </select> </td> </tr> . - Within lib-custom.php I added in the CUSTOM_userCreate function this… PHP Formatted Code /* ===== Carreras ==== */$carrera = ''; if (isset ($_POST['carrera'])) { // COM_applyFilter would strip special characters, e.g. quotes, so // we only strip HTML $carrera = strip_tags ($_POST['carrera']); $carrera = addslashes ($carrera); } /* =================== */ DB_query("UPDATE {$_TABLES['users']} SET email = '$email', homepage = '$homepage', fullname = '$fullname', carrera = '$carrera' WHERE uid = $uid"); return true; . - and Within the CUSTOM_userForm function the following thing: PHP Formatted Code $user_templates->set_var('FULLNAME', $LANG04[3]);$user_templates->set_var('FULLNAME_HELP', $LANG04[34]); $fullname = ''; if (isset ($_POST['fullname'])) { $fullname = strip_tags ($_POST['fullname']); } $user_templates->set_var('fullname', $fullname); // -------------------------------------------- // Carrera // -------------------------------------------- $user_templates->set_var('CARRERA', $LANG04[161]); $user_templates->set_var('CARRERA_HELP', $LANG04[162]); $fullname = ''; if (isset ($_POST['carrera'])) { $fullname = strip_tags ($_POST['carrera']); } $user_templates->set_var('carrera', $carrera); // --------------------------------------------- Now, when attempt to make a registry new of user keeps all the data to me but NOT the one that new that I put, in my case the item " carrera" . How I needs to me so that it can keep that new field in my data base? Grettings !! **Cuando el Alumno esta listo, el Maestro Aparece ** ::Geeklog support in Spanish:: |
||||||
|
|||||||
| Content generated in: 1.09 seconds |
|
|
|