MsKazza Posted October 22, 2011 Share Posted October 22, 2011 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 Quote Link to comment Share on other sites More sharing options...
MsKazza Posted October 22, 2011 Author Share Posted October 22, 2011 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted October 22, 2011 Share Posted October 22, 2011 I don't understand the question. Quote Link to comment Share on other sites More sharing options...
MsKazza Posted October 22, 2011 Author Share Posted October 22, 2011 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted October 22, 2011 Share Posted October 22, 2011 So what's the problem? Quote Link to comment Share on other sites More sharing options...
MsKazza Posted October 22, 2011 Author Share Posted October 22, 2011 how do i make one form field insert it's value into several mysql columns of the same record? They want it put in the second to last, third to last and forth to last fields Quote Link to comment Share on other sites More sharing options...
awjudd Posted October 22, 2011 Share Posted October 22, 2011 This seems to be a JavaScript related question and not a mysql one. You will need to just bind to the onchange event and update all of the other fields which correspond to the gender to say the same value. ~juddster Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.