TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-11-2009, 08:43 PM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Arye is on a distinguished road
Bricks Coding conventions on making a small CMS

Hi all,

First post here in the forums ... :)

I am in the stages of building a very small CMS for my needs in order to be able to create websites easy.

I have planned my project very well and structured but my problem is more in the coding conventions since it seems no matter where i look at people PHP codes you see they are unique which is fine but not anwering my question.

In order to clarify what i am after i will present a case i am working right now and would love to hear your suggestions on how to handle the situation.

I am in the part where a build a gallery manager module to my CMS.
I call it gallery.php. the script should be able to create new galleries and edit each gallery items.

i have these calls for the script:
$_GET methods for galleries listing:
- gallery.php? -> reguler call will list the galleries listing
- gallery.php?del=1 -> will delete gallery id which is 1
- gallery.php?edit=1 -> will load the gallery #1 and show items listing
- gallery.php?add=true -> will load the add gallery form

$_GET methods for gallery handling:
- gallery.php?gID=1&del=1 -> will delete item #1 from gallery #1
- gallery.php?gID=1&edit=1 -> will load item #1 for editing and perefences
- gallery.php?gID=1&addItem=true -> will load gallery #1 add item form

$_POST

all the actions that needed to be saved via add forms and such.

of course there are many types of stuff i need to do but my problem is that using many IF on the script and launching functions seems like a long stupid way.

Wanted to know how you will code this kind of need.

Thanks for you time for reading this.


$_POST methods:
Arye is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tips to Improve Your Coding and Projects Village Idiot Tips & Tricks 45 12-03-2012 07:46 AM
Does anyone want to start a small development group? Austin The Lounge 4 12-30-2008 09:13 PM
SQLite vs SimpleXML; For small redundant data stewart General 4 03-14-2008 10:10 PM
Need help outputting data (while making it easy to skin) Andrew Absolute Beginners 5 12-20-2007 01:52 AM


All times are GMT. The time now is 05:20 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design