"PHP - MULTIPLE FORMS - SWITCH case: "(what Structure to use)

This is a discussion on "PHP - MULTIPLE FORMS - SWITCH case: "(what Structure to use) within the PHP Language forums, part of the PHP Programming Forums category; Ok... I have to make this administation area where I have multiple Contents to add edit delete publish . The problem ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-17-2005
Angelos
 
Posts: n/a
Default "PHP - MULTIPLE FORMS - SWITCH case: "(what Structure to use)

Ok... I have to make this administation area where I have multiple Contents
to add edit delete publish .
The problem is that I don't know what is the best way of making the forms.
At the moment I create a new PHP file for add_page.php, add_student.php,
add_news.php, edit_page.php list_page.php and so on.

This way doesn't seem very good to me and I am wondering if I want to put
them in one file or in some more generic files, how am I going to do that.

For start created the content.php and did a switch $_GET['category'] and a
nested $_GET['action'] but I don't know what each case: should contain.

I don't want to put the whole html code for the forms in each case....
I have tried puting each form in a function but I had some stupid errors and
that also doesn't sound to me a good solution.

So if someone has previous experience pls Suggest me something...


Reply With Quote
  #2 (permalink)  
Old 05-17-2005
dracolytch
 
Posts: n/a
Default Re: "PHP - MULTIPLE FORMS - SWITCH case: "(what Structure to use)

Replied to: multiple forms within a Switch statement

Reply With Quote
  #3 (permalink)  
Old 05-18-2005
Jerry Stuckle
 
Posts: n/a
Default Re: "PHP - MULTIPLE FORMS - SWITCH case: "(what Structure to use)

Angelos wrote:
> Ok... I have to make this administation area where I have multiple Contents
> to add edit delete publish .
> The problem is that I don't know what is the best way of making the forms.
> At the moment I create a new PHP file for add_page.php, add_student.php,
> add_news.php, edit_page.php list_page.php and so on.
>
> This way doesn't seem very good to me and I am wondering if I want to put
> them in one file or in some more generic files, how am I going to do that.
>
> For start created the content.php and did a switch $_GET['category'] and a
> nested $_GET['action'] but I don't know what each case: should contain.
>
> I don't want to put the whole html code for the forms in each case....
> I have tried puting each form in a function but I had some stupid errors and
> that also doesn't sound to me a good solution.
>
> So if someone has previous experience pls Suggest me something...
>
>

I normally do separate files. It's much easier to keep the logic
separate. If there are common things between them, I'll create an
include file.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
Reply
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

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




All times are GMT +1. The time now is 11:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0