I need to know what is the best way to design web applications. Just a few tips will do.
Maybe if I show you all an example (not finished) this may help you to understand what I mean a little better.
Expand|Select|Wrap|Line Numbers
- <?
- require_once('../config/Dbconnector.php');
- $connect = new Dbconnector();
- $local = $_SERVER["PHP_SELF"];
- if (!$_GET)
- {
- header("Location: index.php");
- }
Here at the beginning of the script if it dosent get any variables it goes back to the index page of the website.
Expand|Select|Wrap|Line Numbers
- else if ( $_GET['mode'] )
the next part
Expand|Select|Wrap|Line Numbers
- {
- if ($_GET['mode'] == "create") //>>>>> if mode = create do this
- {
- echo "League Name: ".$_POST['name']."<br/>";
- echo "Number of Groups: ".$_POST['num']."<br/>";
- echo "League Type: ".$_POST['type']."<br/>";
- if (isset($_POST['num']))
- {
- //some more code
- exit();
- }
- include("include/create.php"); // OTHER WISE include this into page
- exit();
- }
- }
- else
- {
- echo "SORRY INCORRECT SANTAX";
- }
- ?>
Expand|Select|Wrap|Line Numbers
- <a href = "page.php?id =<? echo $variable ?>"> click here </a>
Sorry I might have over complicated this question. I don't really know enough about the application flow to know what I am asking truely.
If you can decipher this message I would really appreciate it.
Thank you.