NYCPHP Meetup

NYPHP.org

[nycphp-talk] IIS 5 and PHP with User Access

Hans Zaunere hans at nyphp.org
Wed Jul 16 20:53:03 EDT 2003



Keith Richardson wrote:

> Say you click this form:
> 
> <form name="form1" method="post" action="admin.editcal.php">
> <input type="hidden" name="method" value="edit">
> <input type="hidden" name="calid" value="12">
> <input type="submit" name="submit" value="Edit Calendar 12">
> </form>
> 
> And in the top of the admin.editcal.php
> 
> if (empty($_POST['method']))
>   $method = "index";
> else
>   $method = $_POST['method'];
> 
> switch ($method)
> {
>   case "index":
>     // display code to show the list of calendars to edit
>     break;
>   case "edit":
>     // edits 1 calendar
>     break;
>   case "save":
>     // saves the calendar
>     break;
> }
> 
> and it goes to the index page when i click the forms.
> 
> i changed it to accept not just the $_POST['method'] variable, but also
> $method, and then had a link saying <a
> href="admin.editcal.php?method=edit&calid=12">Edit Calendar 12</a> and it
> would go into the edit form, but the form would not submit.

I completed a day of IIS training so I should be an expert (the instructor said that we'll learn in this 3 day course what it'd take a college course to teach for Apache - I'm not so sure yet  :)

Anywhooo, for testing, what if you set the form's method to GET ?  Any differance?  Using the latest version of PHP?  As ISAPI or CGI?

Just some food for thought; maybe I'll get back to you in another couple of days :)

H






More information about the talk mailing list