simcoweb Posted September 18, 2006 Share Posted September 18, 2006 I just need to know if this can be done. I have a contact form that is asking for a 'referrer' selection (who referred you) to be a dropdown menu. What i'd like to do is to generate the selections in that list from the member's list in the database instead of hard-coding it into the form each time we add or lose member.Another 'key' is that I need the referrer's ID # to pass as well so that reports can be created using the ID# as the search key. So, basically when the visitor selects from the member list to choose the referrer that referrer's name is entered into a new table along with their ID# and the person they referred to. Quote Link to comment Share on other sites More sharing options...
Barand Posted September 18, 2006 Share Posted September 18, 2006 Yes, it can. Query the member table and make the option values the memberID and display member name.<option value = '$id' > $name </option>Having selected the referrer you only need store the referrer's id in the new table and not the name. You can get the name by joining to the member table. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted September 19, 2006 Author Share Posted September 19, 2006 Barand, as usual you rock. I'll need to brush up on the 'Join' part of the database structures. I'm not at all familiar with how that works and how to construct it. You've mentioned it before in previous posts. Is there a PHPFreaks tutorial on it somewhere? 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.