Jump to content

inserting value from one form field to various columns


MsKazza

Recommended Posts

Hi there,

 

I have been searching on internet but can't seem to find this.  I have a client that wants the form field 'he/she' to appear only once on the form, however they want the value selected to appear in various mysql columns in the same record, how can i do this.  Any help would be much appreciated.

 

Thanks a million,

 

MsKazza

Link to comment
Share on other sites

your MySQL server version -- absolutely required!  - 5.0

the raw MySQL statement in question [in a CODE block, and without any PHP variables]  -  none so far

any errors that MySQL returns to the client [from mysql_error()]  -  none so far

the table structure & column indexes of the relevant tables [via SHOW CREATE TABLE is preferred]

first_name

sur_name

house_no

street

town

brother_sister_friend1

friend_sibling1

and

brother_sister_friend2

friend_sibling2

she_he

his_her

him_her

from_title from_name

 

 

the EXPLAIN output for your query, if applicable

a clear and concise description of what you want this statement to achieve  -  as above

a description of what it's currently doing that's not to your liking

a brief listing of the types of things you've attempted so far

Link to comment
Share on other sites

ok, the site is for a company that want to make special children's xmas books.  the user enters basic info into the form, their names, the childs name, the sex of the child, and contact info.  However in the database there are the fields mentioned above.  Want to know if it's possible to have the form if the user selects for instance that the child is a boy, insert into more than one column the word he or his and likewise if they choose girl, she or hers.

 

Hope that makes more sense, looking at it now though i've a feeling though that this might be more a php question possibly.

 

Thanks,

 

MsKazza :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.