Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 05:44 am EST
Geeklog Forums
Add new field in new user register
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…. .
<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…
$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:
$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::
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…. .
Text 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…
Text 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:
Text 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::
8
7
Quote
All times are EST. The time is now 05:44 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content