Using require instead of redirect architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe I'm too old a dog to teach a new trick to.

I've got the redirect example discussed a couple days ago working
nicely. Back, Refresh, 'wrong username' - all work nicely.

But I like the idea of reducing the load on the server, maybe
alleviating some redirect pinball. So been trying to use require
instead, and all hell has broken loose. Clearly I'm not structuring
these pages correctly, but I've run into a conceptual wall of what I
should be doing.

p1.php:
- display form
- post to p2.php

p2. php
- grab and validate input
- if good, require p3.php (which says "congrats!")
- if bad, set error message and require p1.php (which displays error
msg and displays form again)

Problems:
- hitting back on p2.php shows the dreaded "The page you are trying to
view contains POST..."
-- OK and Cancel both generated unsatisfactory results
- hitting refresh on p2.php runs the validation again, which means the
validation code now has to be that much more complicated to trap for a
second attempt, blah blah blah.

So the architecture needs to look different. Been hitting my head
against a wall - I'll be darned if I can figure out what it is.

-- 
RE, Chicago

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux