473,322 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

"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...
Jul 17 '05 #1
2 2513
Replied to: multiple forms within a Switch statement

Jul 17 '05 #2
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.
js*******@attglobal.net
==================
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Terence | last post by:
These comparrison articles are always fun :) http://otn.oracle.com/pub/articles/hull_asp.html
12
by: junky_fellow | last post by:
Which is better using a switch statement or the if-then equivalent of switch ?
2
by: iincity | last post by:
hi,all, please see following: int index = 0 switch(index){ case 0 - 10: break; default: break;
3
by: ken | last post by:
any function is equal to "Switch" in Java with VB thank heaps
3
by: zeltus | last post by:
Hi I've "upgraded" to PHP5 on my windoze box and whilst I'm stumbling up the learning curve quite happily, I'm a bit stuck at how to use the php.exe CLI binary. I've tried using "php -a" and...
2
NewYorker
by: NewYorker | last post by:
Write a switch statement that tests the value of the char variable response and performs the following actions: if response is y , the message Your request is being processed is printed if ...
1
by: Troy Bull | last post by:
Greetings I am trying to use a singleton to hold a group of forms. I have a MDIMaster form. I have a class called Forms; Forms is a singleton. I want to do something like the following. In...
9
by: anon.asdf | last post by:
In terms of efficieny: Is it better to use multiple putchar()'s after one another as one gets to new char's OR is it better to collect the characters to a char-array first, and then use...
5
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.