473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

insert 2 text data fields into one field MySQL

57
Phone or A/C id data insert into one field.
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="phone" id="ph" onKeyUp="document.getElementById('ac').disabled=!!this.value.length;" onFocus="this.value='017'" size="20" maxlength="11" />
  2. <input type="text" name="acc"  id="ac" onKeyUp="document.getElementById('ph').disabled=!!this.value.length;" onFocus="this.value='1.'"  size="20" maxlength="10" />
Please help me how to do
Apr 2 '08 #1
8 3283
hsriat
1,654 Expert 1GB
Phone or A/C id data insert into one field.

<input type="text" name="phone" id="ph" onKeyUp="document.getElementById('ac').disabled=!! this.value.length;" onFocus="this.value='017'" size="20" maxlength="11" />

<input type="text" name="acc" id="ac" onKeyUp="document.getElementById('ph').disabled=!! this.value.length;" onFocus="this.value='1.'" size="20" maxlength="10" />

Please help me how to do
What do you want to achieve now?

(You could have asked in your previous thread, no need to double post)
Apr 2 '08 #2
Noorain
57
What do you want to achieve now?

(You could have asked in your previous thread, no need to double post)
i want to insert data in database.(php & mysql)

At a one time phone or a/c id insert in database. For this i have to use two textbox.
please help me
Apr 2 '08 #3
hsriat
1,654 Expert 1GB
i want to insert data in database.(php & mysql)

At a one time phone or a/c id insert in database. For this i have to use two textbox.
please help me
This example may help you.
Apr 2 '08 #4
ronverdonk
4,258 Expert 4TB
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Apr 2 '08 #5
ronverdonk
4,258 Expert 4TB
..i want to insert data in database.(php & mysql)
When you do not know how to insert data, via PHP, in a MySQL database, I suggest that you take some PHP and MySQL tutorials first, before you continue.

Then come back to ask question when having problems, not to ask for ready code on an insert.

Ronald
Apr 2 '08 #6
Noorain
57
This example may help you.
When you do not know how to insert data, via PHP, in a MySQL database, I suggest that you take some PHP and MySQL tutorials first, before you continue.

Then come back to ask question when having problems, not to ask for ready code on an insert.

Ronald
I know how to insert. You don't get what my ques.

Normally we use text box for insert data into database. suppose i use 3 textbox for name, nick name, phone. For this my table is user_id( int 6), user_name(varchar 100), user_phone(int 11). If i insert nick name it also add in user_name field.

Name AA
Nick Name
Phone 123
For this
insert into user values('','AA',123)

Name AA
Nick Name BB
Phone 123
For this how to insert. I think now u understand what i want.
Apr 3 '08 #7
hsriat
1,654 Expert 1GB
As far as I can understand you, I guess you want to update the database row instead of inserting a new row. Is it?
If that's the case you can have a look at this tutorial.
If not, then please explain it properly.

Regards,
Harpreet
Apr 3 '08 #8
Noorain
57
As far as I can understand you, I guess you want to update the database row instead of inserting a new row. Is it?
If that's the case you can have a look at this tutorial.
If not, then please explain it properly.

Regards,
Harpreet
Thanks
i can slove my problem.
Apr 10 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tavish Muldoon | last post by:
What a pain trying to insert data into a table from a stored proc. My webform asks for 16 pieces of data - which then gets written to the database. I found this easier than the crap below...
4
by: Rob | last post by:
Hey, I'm pretty new to MySQL and have a question. I've built a database locally and have inputed some information. I need to go back and update some records, specifically by taking long pieces...
20
by: akej via SQLMonster.com | last post by:
Hi, i have table with 15 columns CREATE TABLE . ( PRIMARY KEY , NULL , NULL , NULL , NULL , (50) NULL , NULL
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
3
by: 4partee | last post by:
I'm trying to import a csv file with a PHP procedure. However, some of the lines in the csv file have missing values. When this command is given to mysql: insert tablex values...
6
by: Kevin Chambers | last post by:
Hi all-- In an attempt to commit an Access MDB to a versioning system (subversion), I'm trying to figure out how to convert a jet table's metadata to text, a la SaveAsText. The end goal is to...
11
by: Ted | last post by:
OK, I tried this: USE Alert_db; BULK INSERT funds FROM 'C:\\data\\myData.dat' WITH (FIELDTERMINATOR='\t', KEEPNULLS, ROWTERMINATOR='\r\n');
6
by: Ted | last post by:
I used bcp to produce the apended format file. How can it be modified to recognize the quotes that surround the text fields and not insert the quotes along with the text? Invariably, the first...
2
josie23
by: josie23 | last post by:
Egad, I'm not a coder/programmer by nature or occupation but understand things like html and css and a small amount of perl. So, basically, I'm a perl/mysql imbecile. But, I've been trying to...
0
chumlyumly
by: chumlyumly | last post by:
Hello scripters - OS: Mac OSX Language: PHP w/ MySQL database I've created an insert page where a user inputs his info, which then goes to four different tables in a MySQL database. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.