Click here to Skip to main content
15,893,588 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: html in database Pin
cjoki16-Sep-10 7:53
cjoki16-Sep-10 7:53 
AnswerRe: html in database Pin
Luc Pattyn16-Sep-10 9:31
sitebuilderLuc Pattyn16-Sep-10 9:31 
Questionsessions Pin
AndyInUK14-Sep-10 7:08
AndyInUK14-Sep-10 7:08 
AnswerRe: sessions Pin
User 171649214-Sep-10 7:53
professionalUser 171649214-Sep-10 7:53 
AnswerRe: sessions Pin
cjoki15-Sep-10 10:05
cjoki15-Sep-10 10:05 
Question.NET to PHP Pin
AndyInUK12-Sep-10 23:58
AndyInUK12-Sep-10 23:58 
AnswerRe: .NET to PHP [modified] Pin
User 171649213-Sep-10 3:33
professionalUser 171649213-Sep-10 3:33 
AnswerRe: .NET to PHP Pin
cjoki13-Sep-10 5:00
cjoki13-Sep-10 5:00 
I generally do not use OOP in PHP as I do not feel it is needed. But to make your code easier to manage you can use some of the things I do to my large projects.

Make use of includes to seperate your code into logical sections. I generally will have a main page that will post to itself for a given wensite section. The post logic is parsed at the top of the php page, and as needed will load various includes depending on the values passed. Each include can contain a form, more logic, javascript, etc...

fo eaxample I set up a typical page like this...

<?php
   start_session();
   include('master_includes.php');
   $pg_name = 'A PAge';
   pg_header($pg_name);
   // page content start..................

   // page content end....................
   pg_footer('$pg_name');
?>


master_includes.php usually has a list of all the different scripts I use for the site.
A common list might be:
- db_connect.php
- header.php
- footer.php
- functions.php
- variables.php
- menu.php


I hope this helps you.

All the Best!
QuestionHosting web server on a device like camera embedded system Pin
mohit`128-Sep-10 10:25
mohit`128-Sep-10 10:25 
AnswerRe: Hosting web server on a device like camera embedded system Pin
Luc Pattyn8-Sep-10 11:14
sitebuilderLuc Pattyn8-Sep-10 11:14 
GeneralRe: Hosting web server on a device like camera embedded system Pin
mohit`129-Sep-10 3:50
mohit`129-Sep-10 3:50 
QuestionRe: Hosting web server on a device like camera embedded system Pin
Tony Richards8-Sep-10 13:10
Tony Richards8-Sep-10 13:10 
AnswerRe: Hosting web server on a device like camera embedded system Pin
mohit`129-Sep-10 3:51
mohit`129-Sep-10 3:51 
GeneralRe: Hosting web server on a device like camera embedded system Pin
cjoki9-Sep-10 4:48
cjoki9-Sep-10 4:48 
GeneralRe: Hosting web server on a device like camera embedded system Pin
mohit`129-Sep-10 5:53
mohit`129-Sep-10 5:53 
GeneralRe: Hosting web server on a device like camera embedded system Pin
cjoki9-Sep-10 7:27
cjoki9-Sep-10 7:27 
GeneralFile listing From Folder Pin
raju.jangid3-Sep-10 3:28
raju.jangid3-Sep-10 3:28 
GeneralRe: File listing From Folder PinPopular
Smithers-Jones3-Sep-10 4:20
Smithers-Jones3-Sep-10 4:20 
QuestionCustom Web Page Pin
jacque993-Sep-10 1:19
jacque993-Sep-10 1:19 
Questionpython Pin
mihef2-Sep-10 11:17
mihef2-Sep-10 11:17 
AnswerRe: python PinPopular
Luc Pattyn2-Sep-10 12:13
sitebuilderLuc Pattyn2-Sep-10 12:13 
AnswerRe: python Pin
Dr.Walt Fair, PE2-Sep-10 15:45
professionalDr.Walt Fair, PE2-Sep-10 15:45 
AnswerRe: python Pin
David Skelly3-Sep-10 1:47
David Skelly3-Sep-10 1:47 
AnswerRe: python Pin
etkid8425-Aug-11 3:43
etkid8425-Aug-11 3:43 
Question"Submit" Help... Pin
Katkot28-Aug-10 0:12
Katkot28-Aug-10 0:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.