English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Trying to copy values from two different text fields and add these values into a single seperate text field.....if you anyone understands what I mean??!!
Basically, I am trying to enable a user to create their own unique user ID for a registration system. I want the values of the SURNAME field and the Date of Birth field to be combined into ONE SINGLE FIELD, called user ID. An exmaple of this would be ........ User ID : [ smith170188] - smith being the surname, and 170188 being the Date of Birth.

Thanks in advance!

2007-11-09 02:00:02 · 4 answers · asked by gecko 2 in Computers & Internet Programming & Design

4 answers

What scripting language are you using?

This will need to be either php, asp, java, etc for you to accomplish this html wont work here. Since you also need to store that I would assume you also need to put the result into a database which also needs some script language.

So as you have asked this, there really is not enough information to get you a good answer.

Here is a sample of a complete php user signup.
http://www.xentrik.net/php/signup/complete.php
and a tutorial on building one
http://www.plus2net.com/php_tutorial/php_signup.php

ADD - If you are using php, add strings by
http://www.plus2net.com/php_tutorial/php_string_add.php
$string_3=$string_1 . $string_2 the DOT combines them

2007-11-09 02:06:44 · answer #1 · answered by Tracy L 7 · 0 0

If you are using this with a database, not a good way to go. Set up a primary key integer, then a unique key combining last name first name and dob or postcode, use the integer as the user id, this will be much faster to reference, and a simple lookup on the id gives you the data to display when required.

2007-11-09 02:27:07 · answer #2 · answered by Anonymous · 0 1

The exact syntax will depend on what language you are using but basically you just need to concatenate the two strings.

In C# it would go something like:

textBoxUserId.Text = textBoxSurname.Text + textBoxBirthdate.Text;

2007-11-09 02:06:37 · answer #3 · answered by Mark B 5 · 0 0

That process is called concatenation.

Go to the help section of whatever software you are using and find out how to use the concatenation operator.

2007-11-09 02:16:13 · answer #4 · answered by ray_diator 7 · 0 1

fedest.com, questions and answers