bluedogatdingdong Posted August 17, 2004 Share Posted August 17, 2004 Hi Another problem I can't get my head around. I am trying to insert an record into a table but one of the fields is a lookup to another table ...... (this bit works okay) ...... but I need to be able to make multiplue selections. Althougn it looks like you can selct more than one, it only adds 1 record. See example at http://www.cornwallwildlifetrust.org.uk/ev...dtwotables1.php Username: diaryeditor Password: havefun I've cheated at the moment and passworded the whole directory - next job will be to set up a proper loggin system! Link to comment https://forums.phpfreaks.com/topic/1921-one-to-many/ Share on other sites More sharing options...
ReD_BeReT Posted August 17, 2004 Share Posted August 17, 2004 I have the same problem... here is the solution: You must only put this brackets to the name of the (?) input tag: <select name="sample[]"> WIth the []-brackets the name is not a variable, its a array... the array you canread with foreach or for. Link to comment https://forums.phpfreaks.com/topic/1921-one-to-many/#findComment-6264 Share on other sites More sharing options...
bluedogatdingdong Posted August 18, 2004 Author Share Posted August 18, 2004 I have tried your suggestion and it won't insert a record at all now! Sorry I am a real begginer, do I have to alter anything else? Link to comment https://forums.phpfreaks.com/topic/1921-one-to-many/#findComment-6266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.