473,763 Members | 7,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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 2536
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*******@attgl obal.net
=============== ===
Jul 17 '05 #3

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

Similar topics

6
2520
by: Terence | last post by:
These comparrison articles are always fun :) http://otn.oracle.com/pub/articles/hull_asp.html
12
3233
by: junky_fellow | last post by:
Which is better using a switch statement or the if-then equivalent of switch ?
2
1326
by: iincity | last post by:
hi,all, please see following: int index = 0 switch(index){ case 0 - 10: break; default: break;
3
1539
by: ken | last post by:
any function is equal to "Switch" in Java with VB thank heaps
3
1475
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 other than sucking in everything I type until I get bored and Ctrl-C it, I can't get it to do anything useful. What I hope it will do is accept input from me and return the results -
2
6862
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 response is n , the message Thank you anyway for your consideration is printed if response is h , the message Sorry, no help is currently available is printed for any other value of response , the message Invalid entry; please try again is...
1
1822
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 MDIMaster (and other forms), I want to get an instance of Forms (the only instance). Inside Forms then there are public variables for each of the possible forms, if a "form" has never been accessed the Forms factory creates a new instance of the...
9
4099
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 puts() to print to screen ????
5
7366
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 : $http_ref= $HTTP_REFERER; $prog = $_COOKIE;
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.