Developing the dynamic website

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Reqless
Forum Newbie
Posts: 3
Joined: Fri Dec 24, 2010 5:28 am

Developing the dynamic website

Post by Reqless »

Basically I just recently got accepted to be an "it intern" for a commercial realty company in the area. There are 3 people within the team that I was hired as an intern for, and they wanted a central location where they would be able to find information or documents related to a certain job regardless of their current location. Any one of them would be able to upload files or enter information regarding a certain job and all three would be able to find that information quickly and easily at a later date.

The best idea that I could think of was to create a secure website that would, over time, be able to be run and updated by the three people within the team without having to wait for me to manually enter the information in. This is obviously a fairly complicated project for a person knowing only the basics of php/mysql (me :P), however a great learning experience in my opinion as well.

So here I am starting out and I am wondering if the basic idea of this would be too complicated to even think about for a novice, or if it would be something very possible with the time, determination, and a little bit of help on the side.

To save some time and a couple of replies: if this is at all a possible project, the first questions I have regarding this would be:
:arrow: What is an easy way to have a dynamic content section with php, so that the template stays the same, but the information changes? I have been browsing and browsing and the only thing I could find is a switch, case, default or similar setup. I have a feeling that there has got to be an easier way to do this than adding a case for each and every page for the website.
:arrow: The next would deal with security. I know this can be a very complex field and should probably not be messed with by a newbie without risk of some serious holes. Are there any good scripts available that I would be able to use for free, or should I just go with finding a company to help me out with this?

Sorry for the long read, and any ideas/input would be greatly appreciated,
Reqless
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Developing the dynamic website

Post by Jonah Bron »

Sounds like you need a framework. Look into Zend or CakePHP.

http://framework.zend.com/
http://cakephp.org/

That will help you with dynamic pages, security, and everything else. Sorry I don't have time to give you more info.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Developing the dynamic website

Post by alex.barylski »

I agree with Jonah but would take it one level higher and use a CMF (content management framework) such as Drupal. The learning curve is high but the amount of work it will save you is huge and it does exactly as you require almost out of the box.

What I have done at work is setup a samba share (you would need to use WebDAV if they work form home or on the road and need to upload files) but this is getting into relatively advanced Linux system administration. For now Drupal and a file upload module would likely do the trick.

Cheers,
Alex
Reqless
Forum Newbie
Posts: 3
Joined: Fri Dec 24, 2010 5:28 am

Re: Developing the dynamic website

Post by Reqless »

Thanks for the information! I'll be checking them out shortly.
Reqless
Forum Newbie
Posts: 3
Joined: Fri Dec 24, 2010 5:28 am

Re: Developing the dynamic website

Post by Reqless »

So I ended up looking at the CMSs mentioned, and somewhere along I found a different CMS, ModX that accommodates my needs slightly better.
Just figured I'd post it here in case others wanted to check it out.

However now I'm moving into my next problem, dealing with updating a mysql database with form input.
I'm not quite sure if there's a better way to go about this than the way I currently am, however here's the setup I'm looking at:

I have multiple tables that have primary key/foreign key relationships with each other. In this instance the relationship is 'propertyID'.

So one table (property) would have rows something like this: propertyID(pk), propertyName, propertyType, etc. (where property ID would Auto_Encrement.)
Another table (pending_listing) would have 2 rows: propertyID(fk), pending_listing (which would be either 'l' or 'p')
another table (listing): listingID[pk(not sure if this is needed, however i've read every table should have a unique pk)], propertyID(fk), listingCompany, listingLocation, etc. (where there would be multiple listings per property)
another table(location): propertyID(fk), address, city, state

The form I was creating would have information that would be added to each of the tables. However the Primary keys should each increment by 1, yet I would want the propertyID foreign keys to match the initial propertyID Primary Key, for instance the listing table which would have multiple listings per property, making auto increment not an option.
From what I could imagine that would happen is that the original propertyID would not match the correct propertyID within another table (like the listing table) creating mix-matched data.
Am I going about this completely wrong, or am I just unable to figure out the proper way to use PHP to insert to new values to each of the tables.
Thanks again,
Richard
Esspweb
Forum Newbie
Posts: 1
Joined: Wed Feb 09, 2011 12:37 am

Custom Essay Writing

Post by Esspweb »

Awesome information you have shared. Thanks for it.
Post Reply