Jump to content

Recommended Posts

Heya,

Ive been wondering how to do this for a fair while now and im sure its easy to do but im not 100% sure what im even looking for when looking for tutorials, basicaly im writing an events calander but when an event is made registerd users will be added to it by the creator.

So say i select i wanted 8 staff to go on a trip and each staff member can supervise 8 people, the forum would generate 8 columns with drop down boxes listing all the possible users (top box being the staff member) then it'd add all that information to the db and it'd be easily pulled out so everyone can see, ive got all the tables sorted:

// Divers personal information.
DROP TABLE IF EXISTS `Divers`;
CREATE TABLE IF NOT EXISTS `Divers` (
`Diver_id` int(3) NOT NULL auto_increment,
`Title` varchar(4) default NULL,
`Forename` varchar(32) default NULL,
`Init` varchar(1) default NULL,
`Surname` varchar(32) default NULL,
`ADDR1` varchar(32) default NULL,
`ADDR2` varchar(32) default NULL,
`ADDR3` varchar(32) default NULL,
`ADDR4` varchar(32) default NULL,
`ADDR5` varchar(32) default NULL,
`Postcode` varchar(8) default NULL,
`Tel1` varchar(15) default NULL,
`Tel2` varchar(15) default NULL,
`Mobile` varchar(15) default NULL,
`Email` varchar(50) default NULL,
`Padi_Level` varchar(20) default NULL,
`Hol_ADDR1` varchar(32) default NULL,
`Hol_ADDR2` varchar(32) default NULL,
`Hol_ADDR3` varchar(32) default NULL,
`Hol_ADDR4` varchar(32) default NULL,
`Hol_ADDR5` varchar(32) default NULL,
`Hol_Tel` varchar(15) default NULL,
`Next_Kin` varchar(30) default NULL,
`DOB` varchar(8) default NULL,
`Staff` varchar(8) default NULL,
PRIMARY KEY (`Diver_id`,`Forename`,`Surname`,`Postcode`),
) TYPE=MyISAM;

// Events, set in the calander
DROP TABLE IF EXISTS `Event_log`;
CREATE TABLE IF NOT EXISTS `Event_log` (
`Event_id` int(3) NOT NULL auto_increment,
`Date` date NOT NULL default '0000-00-00',
`Activity` date NOT NULL default '0000-00-00',
PRIMARY KEY (`Event_id`,`Date`,`Activity`),
) TYPE=MyISAM;

// Dive logs, this matches divers to dives and checks if theyre staff for that event.
DROP TABLE IF EXISTS `Divers_log`;
CREATE TABLE IF NOT EXISTS `Divers_log` (
`Diver_ID` varchar(15) default NULL,
`Event_ID` varchar(15) default NULL,
`Diver_Level` varchar(15) default NULL,
PRIMARY KEY (`Diver_ID`,`Event_ID`,`Diver_Level),
) TYPE=MyISAM;

its for a diving community i belong too, basicaly the info from all the other divers is kept in one table, the events are kept in another and then theres a third table that matches them all up, ive got all that down im just wondering about the input.

ive been looking into ajax etc to do this sort of thing without refreshing the form but again im not entirely sure what im looking for. any links to tutorials/examples would be greatly appreciated
Link to comment
https://forums.phpfreaks.com/topic/11851-arrays/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.