Alidad Posted October 26, 2012 Share Posted October 26, 2012 Hi, I'm rookie in php and i tried to figure out myself how to write that code. A new member signup as new member and send data value to mysql database name 'temp_member' table aand then admin will need for approval. if admin approve this is just press button to transfer data value from 'temp_member' table to other table name 'per_member'. my question is that how can i write that code to transfer profile information from table to other table like from 'temp_member' to 'per_member'. please help thanks. AM Quote Link to comment https://forums.phpfreaks.com/topic/269944-insert-data-value/ Share on other sites More sharing options...
ManiacDan Posted October 26, 2012 Share Posted October 26, 2012 INSERT INTO PER_MEMBER ( SELECT * FROM TEMP_MEMBER WHERE MEMBER_ID = 123 ); Also, this is not PHP in any way. Quote Link to comment https://forums.phpfreaks.com/topic/269944-insert-data-value/#findComment-1387970 Share on other sites More sharing options...
Christian F. Posted October 26, 2012 Share Posted October 26, 2012 Another option you have, is to add a enum "status" field to the members table. Then you can set it to a value (let's say 'pending') to denote whether or not a member is pending approval. Once approval is given, you can set it to something else (for example 'member'). By using an enum you have a limited set of values, all which can be referenced via plain text or their index. You can also extend this set, in case you want to add more user-levels in the future. Quote Link to comment https://forums.phpfreaks.com/topic/269944-insert-data-value/#findComment-1388029 Share on other sites More sharing options...
jcbones Posted October 26, 2012 Share Posted October 26, 2012 Christian's way is how I always handle this situation. I will vote it up on that basis. Quote Link to comment https://forums.phpfreaks.com/topic/269944-insert-data-value/#findComment-1388042 Share on other sites More sharing options...
ManiacDan Posted October 27, 2012 Share Posted October 27, 2012 Depends on how many people will be rejected and how you want to handle that. If a very small percentage will be in "rejected" or "pending" state, then the enum is a good idea. If a large number, a separate table may be faster. Quote Link to comment https://forums.phpfreaks.com/topic/269944-insert-data-value/#findComment-1388064 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.