Get ready for BLACK FRIDAY shopping starting in

Forums

PHP

This topic is locked

Help with php registration page

Posted 20 Jul 2009 19:19:49
1
has voted
20 Jul 2009 19:19:49 Judy Wert posted:
I am working on a registration page for our employee health site. We have walking teams at several buildings. Right now the form checks for duplicate emails. I need the form to also check for duplicate team names based on building location. Anyone have any ideas how this can be done?
I am using Dreamweaver CS4 PHP and MySQL

ht.kentisd.org/oregon_trail/Templates/captains_RegistrationTest.php

Replies

Replied 21 Jul 2009 21:27:02
21 Jul 2009 21:27:02 Alan C replied:
Hi,
I guess you will have something like team name, building location and then a list of members, in tables linked by foreign keys.

Building location sounds like your main table, so you could have an id number, plus text description, then another table of team names using the building id as a foreign key in the team name record. Then finally a list of members, these would be the people and in the people table you would have the id of the team inserted as a foreign key.

This is not easy to describe in words :-)

So you now have three tables and you can write some queries to check that the same team name does not occur twice in the same building. You will need to do an advanced query because the SELECT will be too complex for the standard DW box

Hope that helps
Replied 22 Jul 2009 08:12:24
22 Jul 2009 08:12:24 Patrick Julicher replied:
Hi Judy,

I agree with Alan. This would be the way to do it.

Kind regards, Patrick

Reply to this topic