Jump to content

danwilk

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

danwilk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Barand, I got the form to work with the checkboxes and MbrId's but for some reason I think I don't have the form processing logic correct, can you take a look? Attid is auto incremented and instead of meeting id I am using the meeting date since I am tracking only one type of meeting. [code] <? $link = mysql_connect("localhost","root","pass"); mysql_select_db("dbname",$link); $query=("insert into ConfAttendance(mbrid,confdate) or die(mysql_error())"); if (isset($_POST['submit'])){ for each($_POST['attend'] as Mbrid),($_POST['meetdate'] as confdate) { mysql_query($query); } } ?> [/code] [!--quoteo(post=351811:date=Mar 5 2006, 07:16 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 5 2006, 07:16 AM) [snapback]351811[/snapback][/div][div class=\'quotemain\'][!--quotec--] Three tables Member --------- memberID | name | etc Meeting ---------- meetingID | meeting_name | meeting_date Attendance --------------- attID meetingID memberID So for each person at each meeting there is a record in the attendance table. Have form (generate from member table) like this where checkbox value is the memberID of the member [code]<FORM method='POST'> <INPUT TYPE='TEXT'  name='attend[]' value='1'> Adam <INPUT TYPE='TEXT'  name='attend[]' value='2'> Ben <INPUT TYPE='TEXT'  name='attend[]' value='3'> Cath <INPUT TYPE='SUBMIT'  name='submit' value='Submit'> </FORM>[/code] Then to process [code]if (isset($_POST['submit'])) {     foreach($_POST['attend'] as memberID) {             // add record to attendance table     } }[/code] [/quote] [code][/code]
  2. I have created a complete package for my church to use for members and meeting minutes, etc.. but I am having trouble designing a way to submit attendance at our monthly conference meeting. I have designed a member database in MySQL where the unique key is auto generated number and I want to design something like a PHP page that lists the members and I can select them with a check box or something and it update the Attendance table. I'm not sure how to handle that part of the design. I think I might be able to write some inquiries to join the member table and the attendance tables once I get over this hurdle. Any help is appreciated. Thanks, Daniel
×
×
  • 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.