Posted: Thu Aug 24, 2006 5:34 pm
I think he Hockey is 'posting' data back to the page when a user incorrectly fills out a form, and the form maintains it's previously submitted values.. or atleast a similar scenario.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Here is what I am trying to do...feyd wrote:This bit doesn't make sense. Grammatically I can't figure out what specifically you mean.Hockey wrote:I need to carry out the process concurrently so when the page is requested the POST data is displayed in the FORM elements...
Bingo was his name-oJenk wrote:I think he Hockey is 'posting' data back to the page when a user incorrectly fills out a form, and the form maintains it's previously submitted values.. or atleast a similar scenario.
Code: Select all
header("HTTP/1.0 307 Temporary redirect");According to http://ppewww.ph.gla.ac.uk/~flavell/www ... irect.html I just read that shouldn't be used as it requires client confirmation before the redirect excutes...or something to that effect...Jenk wrote:Code: Select all
header("HTTP/1.0 307 Temporary redirect");
or for a more 'real' solution, you could try out PECL's Http extension.
Code: Select all
<html>
<body onload="document.forms[0].submit()">
<noscript>
An error occurred, plese click here to be redirected
</noscript>
<form action="../index.php?page=postad" method="post">
<input type="hidden" name="first_name" value="<?=$first_name;?>" />
</form>
</body>
</html>
Code: Select all
if (!allFieldsAreValid($_POST)) {
include 'thePageWithTheFormOnIt.php';
die;
} else {
//do the other stuff
}I don't think that's it either...basically the hack I have shown is exactly what I want done, but preferably on the server side, so people with javascript turned off don't need to click a button. Otherwise everything is perfect just a little hackish in feel...Jenk wrote:sounds like you want the equivalent of ASP's Server.transfer()
You could implement the below 'hack' for now:
the action page:according to Marcot on phparch.com such functionality does not exist within PHP.Code: Select all
if (!allFieldsAreValid($_POST)) { include 'thePageWithTheFormOnIt.php'; die; } else { //do the other stuff }