logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-06-2012, 02:37 AM   #1
webgirl
webgirl's Avatar
 
Join Date: Aug 2008
Posts: 10
Default is it possible to clone a form field to database

Hi what I am trying to achieve is:

User inputs to form - name, contact, email, machine model, machine serial
Now if they have more than one machine to insert (could be 15 or more) then I am trying to allow then to click and clone those 2 fields machine model, machine serial and it goes into the database.
Is it possible for mysql to clone these fields?
__________________
"When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong."
http://www.visnetmedia.com
webgirl is offline   Reply With Quote
Old 02-06-2012, 04:41 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

im having problems understanding what you mean by clone .
do you mean multiple values?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 02-06-2012, 05:06 AM   #3
webgirl
webgirl's Avatar
 
Join Date: Aug 2008
Posts: 10
Default

Hi edbr
You have a database 2 fields for your form:
machine_model
machin_serial

The form has both those fields but if a user wants to add another machine e.g. like you can using javascript:
http://www.mdelrosso.com/sheepit/index.php?lng=en_GB

but the results need to go into the mysql database.
__________________
"When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong."
http://www.visnetmedia.com
webgirl is offline   Reply With Quote
Old 02-06-2012, 08:51 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

you dont have database field on a form
. i would say looking that each time you add a field in your form it will be renamed machine_model if cloned it will take a new name ie machine_model01 machin_serial becomes machin_serial01.

so you will need to import into existing database fields

however if not you maybe able to collect the info as an array, and then insert that into a a database seperated with commas ,slashses or what you will. that would be a better senario , you will have to see what options you have in the jquery script
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com