MadJuggla9
2[H]4U
- Joined
- Oct 9, 2002
- Messages
- 3,515
im new to php but just like any other language, its easy to pickup basic syntax and write simple code. ive been using url variables to save coding and client loading times. i am now doing a website for a local realty company and they need it organized like so:
type of land (3)
-- price of land (4)
-- -- town land is in (7)
-- -- -- listings (up to 15)
now, seeing as i have no database knowledge whatsoever, and little php knowledge. i kinda hardcoded it all very inefficiently, but it works perfectly fine. they have 3 types of land (residential, farm, and commercial), each category has 4 price ranges (0-49k, 50-75k, 75-100k, and 100k+) then each of the prices must have a town to choose from in that range (there are 7 towns in the county they cover), each of the towns in that price range will have up to 15 listings *houses for sale* at a time. so i put 15 folders in each of the ending categories named by numbers *1,2,3, etc ... *
for the main page, i have the design and i use a php include statement to load the content area. well ... when i want to reload the content area with a page other than what the main navigation has *for instance: the pricings, towns, and each of the listings* i am making it call back to the index file for the overall site and giving every single page a name bc otherwise the links other than navigation will want to use the entire window. *i hope im making sense*
so i have a variable name for every single individual listing for 7 towns, in 4 different pricing categories, in 3 different types of land. and each town has 15 folders bc they said the maximum houses for sale at any given time would be 15. as you can see .... more than 70% of my .com index file is simply URL variables. and lets say i want to allow the potential-house-buyer to view each of the images of the current house. im using PHP to see how many images of the house there are *within a folder of only images of that house* and i provide a link for each one that, when clicked, loads the image in a small iframe. each and every URL i need to embed *whether it be php includes or images or whatever* must be called from the root directory bc each of the pages i setup are all variables called from the index page. that means even though the image to one of the houses would be current_folder/images/1.jpg must be called like so:
root/property/type_of_land/price/town/numeric_value_of_currently_viewed_house/images/1.jpg
if you are with me at this point .... i think i have my point. i know a database could receive calls and sort by each of the stupid folders i have created. i dont know enough about php really to make it more efficient though. i dont want to redo the entire site as i have it working great and i must also make it easy to edit by the company *they can just throw images in the folders and it knows how many image links to create and overwrites old property if they have already sold it*
is there anything i can do at this point that would be worthwhile to help me? i have just completed everythign and have it working. but i must go thru and create working pages for each and every property *15x7x4x3* before i can release it for them to edit. i know you may be thinking how stupid i am to take on a job like this. i have no problem comprehending the job, i just dont know how to increase my efficiency, they are wanting it asap, and hardcoding took less time than learning hwo to do it another way then putting it all together then explaining a different way of organization to them
any ideas ?!?!? god this is such a mess to get running, but its actually very well organized for them to edit. heres the multiflavored horrorific nightmareish layout:
the scary thing is ... if this works well, i want to ask other realtors, only i wont use this method, i plan to know wtf im doing beforehand
type of land (3)
-- price of land (4)
-- -- town land is in (7)
-- -- -- listings (up to 15)
now, seeing as i have no database knowledge whatsoever, and little php knowledge. i kinda hardcoded it all very inefficiently, but it works perfectly fine. they have 3 types of land (residential, farm, and commercial), each category has 4 price ranges (0-49k, 50-75k, 75-100k, and 100k+) then each of the prices must have a town to choose from in that range (there are 7 towns in the county they cover), each of the towns in that price range will have up to 15 listings *houses for sale* at a time. so i put 15 folders in each of the ending categories named by numbers *1,2,3, etc ... *
for the main page, i have the design and i use a php include statement to load the content area. well ... when i want to reload the content area with a page other than what the main navigation has *for instance: the pricings, towns, and each of the listings* i am making it call back to the index file for the overall site and giving every single page a name bc otherwise the links other than navigation will want to use the entire window. *i hope im making sense*
so i have a variable name for every single individual listing for 7 towns, in 4 different pricing categories, in 3 different types of land. and each town has 15 folders bc they said the maximum houses for sale at any given time would be 15. as you can see .... more than 70% of my .com index file is simply URL variables. and lets say i want to allow the potential-house-buyer to view each of the images of the current house. im using PHP to see how many images of the house there are *within a folder of only images of that house* and i provide a link for each one that, when clicked, loads the image in a small iframe. each and every URL i need to embed *whether it be php includes or images or whatever* must be called from the root directory bc each of the pages i setup are all variables called from the index page. that means even though the image to one of the houses would be current_folder/images/1.jpg must be called like so:
root/property/type_of_land/price/town/numeric_value_of_currently_viewed_house/images/1.jpg
if you are with me at this point .... i think i have my point. i know a database could receive calls and sort by each of the stupid folders i have created. i dont know enough about php really to make it more efficient though. i dont want to redo the entire site as i have it working great and i must also make it easy to edit by the company *they can just throw images in the folders and it knows how many image links to create and overwrites old property if they have already sold it*
is there anything i can do at this point that would be worthwhile to help me? i have just completed everythign and have it working. but i must go thru and create working pages for each and every property *15x7x4x3* before i can release it for them to edit. i know you may be thinking how stupid i am to take on a job like this. i have no problem comprehending the job, i just dont know how to increase my efficiency, they are wanting it asap, and hardcoding took less time than learning hwo to do it another way then putting it all together then explaining a different way of organization to them
any ideas ?!?!? god this is such a mess to get running, but its actually very well organized for them to edit. heres the multiflavored horrorific nightmareish layout:
Code:
residential
49k
latham
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dresden
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
gleason
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
palmersville
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sharon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
martin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
greenfield
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
50k
latham
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dresden
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
gleason
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
palmersville
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sharon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
martin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
greenfield
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
75k
latham
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dresden
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
gleason
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
palmersville
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sharon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
martin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
greenfield
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
100k
latham
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dresden
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
gleason
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
palmersville
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sharon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
martin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
greenfield
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
the scary thing is ... if this works well, i want to ask other realtors, only i wont use this method, i plan to know wtf im doing beforehand