[eluser]zebake[/eluser]
Wow, fast response, thanks Jedd!
[quote author="jedd" date="1246508924"]
So you can have your second lump of LI's wrapped in a conditional and just test for whether your _alt stuff is present (isset() should do it).
[/quote]
I think I can figure this part out, thank you.
[quote author="jedd" date="1246508924"]
You may want to investigate the helpers, though, as they can provide a bit nicer code for pushing out a bunch of list items.
[/quote]
I will look more into helpers, as well.
[quote author="jedd" date="1246508924"]
You may also want to reconsider your database schema - feel free to post it - as I suspect you are doing this inefficiently (I'm guessing that you have two address fields per person, right?).[/quote]
You're absolutely right, I know there has to be a more efficient / logical way of doing this. Currently I have one table 'students', with 21 fields in it.
Code:
CREATE TABLE IF NOT EXISTS `students` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`student_lname` varchar(255) DEFAULT NULL,
`student_fname` varchar(255) DEFAULT NULL,
`parents` varchar(255) DEFAULT NULL,
`street` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`state` varchar(255) DEFAULT NULL,
`zip` varchar(255) DEFAULT NULL,
`email1` varchar(255) DEFAULT NULL,
`email2` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`cell` varchar(255) DEFAULT NULL,
`parents_alt` varchar(255) DEFAULT NULL,
`street_alt` varchar(255) DEFAULT NULL,
`city_alt` varchar(255) DEFAULT NULL,
`state_alt` varchar(255) DEFAULT NULL,
`zip_alt` varchar(255) DEFAULT NULL,
`email1_alt` varchar(255) DEFAULT NULL,
`email2_alt` varchar(255) DEFAULT NULL,
`phone_alt` varchar(255) DEFAULT NULL,
`cell_alt` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
I also have the feeling I am trying to reinvent the wheel. I searched through the ignited code forum for some type of contact database that I could modify, but I couldn't find anything. In the end, I will be better off building it myself as I obviously need the knowledge.