Re: switch query (or may be I have done something wrong)
| From: | Olav Bringedal | Date: | Mon, 28 Apr 2003 11:25:54 +0000 |
| Subject: | Re: switch query (or may be I have done something wrong) | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19649@lists.php.net to get a copy of this message | ||
my guess is that $action is emty due to register_global...
try $_GET['action'] instead
olav bringedal
jaggu.org
--- caspar kennerale <caspar@thetuckshop.com> wrote: > I recently updated to
PHP 4.3.1 on my windows maching running at home
>
> Previously I had a composite installation of apache/ PHP/ MySQL. I updated
> the PHP and ppmyadmin for this and all seems (seemed) fine.
>
> I recently tried to install a simple CMS I had written over a year ago
> (which has worked on several different servers).
>
> Different pages are called via a switch for example
>
> http://localhost/admin/admin.php?action=add_default
>
> admin.php being a file whoch contains the switches like this
>
> <?php
>
> switch($action) {
> case "add_default":
> html_header();
> add_title();
> html_admin_navigation();
> insert_record();
> insert_form();
> html_footer();
> break;
> case "
>
> default":
> html_header();
> add_title();
> html_admin_navigation();
> insert_form();
> html_footer();
> break;
>
> }
>
> ?>
>
> The problem is that whenever I request any of the swtiches (there are 10 of
> them) the page only returns the default.
>
> Does any one have any ideas why this might be the case?
> If there an issue with the set up of php?
>
> I have looked at php.ini and there is nothing 'obvious' to my eyes
>
> Thanks
>
> Caspar Kennerdale
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--
Olav Bringedal
jaggu.org
__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer